Skip to content

fix: SSRF via unauthenticated plugin test-layer endpoint #236

Description

@deucebucket

Bug

In plugins.py (~lines 165-219), /api/plugins/test-layer accepts an arbitrary url_template in the POST body, makes the HTTP request server-side, and returns the full response body. /api/plugins/save-layer persists arbitrary URLs to config. No URL validation (scheme, host, private-range blocking) exists.

Impact

Any network-adjacent attacker can scan internal networks, access cloud metadata endpoints (169.254.169.254), or hit localhost services. The test-layer endpoint is a full SSRF proxy with response reflection.

Fix

  • Validate URL schemes (only http/https)
  • Block private/link-local/metadata IP ranges (10.x, 172.16-31.x, 192.168.x, 169.254.x, 127.x, ::1)
  • Consider adding a simple auth check or rate limit

Severity

Critical — full SSRF with response reflection.

Found via pipeline logic audit.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingsecuritySecurity vulnerability

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions