Skip to content

fix: block SSRF by rejecting requests to private/internal IPs#528

Open
Yanhu007 wants to merge 1 commit intofloatpane:masterfrom
Yanhu007:fix/ssrf-private-ip-blocking
Open

fix: block SSRF by rejecting requests to private/internal IPs#528
Yanhu007 wants to merge 1 commit intofloatpane:masterfrom
Yanhu007:fix/ssrf-private-ip-blocking

Conversation

@Yanhu007
Copy link
Copy Markdown
Contributor

Fixes #505

Problem

The HTTP plugin validates URL scheme but does not block requests to private/internal IP ranges, enabling SSRF attacks.

Fix

Add a custom DialContext that resolves hostnames and rejects connections to loopback, private, link-local, and unspecified IPs before establishing connections.

The HTTP plugin validates URL scheme but does not block requests to
private IP ranges. A malicious plugin can probe the local network,
access cloud metadata endpoints (169.254.169.254), or hit internal
services on localhost.

Add a custom DialContext that resolves the target hostname and
rejects connections to loopback, private, link-local, and
unspecified IP addresses before establishing the connection.

Fixes floatpane#505
@Yanhu007 Yanhu007 requested a review from a team as a code owner April 16, 2026 00:12
@github-actions github-actions bot added the bug Something isn't working label Apr 16, 2026
Copy link
Copy Markdown
Member

@andrinoff andrinoff left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello, @Yanhu007
Tests fail, please fix.

Ping, or re-request review, after you do.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

BUG: Plugin HTTP has no SSRF protection

2 participants