Skip to content

fix: validate custom function URL at registration (stored SSRF)#40

Merged
caiwl merged 1 commit into
masterfrom
caiwl/bugs/stored-ssrf
Jun 24, 2026
Merged

fix: validate custom function URL at registration (stored SSRF)#40
caiwl merged 1 commit into
masterfrom
caiwl/bugs/stored-ssrf

Conversation

@caiwl

@caiwl caiwl commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

🤖 Generated with Claude Code

ValidateFunc only checked that name and funcURL were non-empty. The SSRF
URL check (block private/internal/metadata addresses) was applied only at
evaluation time. A caller with PMS write access could register a function
with FuncURL=http://169.254.169.254/... and have it stored; every later
evaluation became an internal-network probe.

Added utils.ValidateFunctionURL (http/https only, rejects private,
loopback, link-local, and unspecified IPs; allows localhost for dev) and
call it from ValidateFunc, which all stores invoke on CreateFunction. The
evaluation-time check remains as defense-in-depth. Added tests.

Co-Authored-By: Claude <noreply@anthropic.com>
@caiwl caiwl merged commit 8dbf23f into master Jun 24, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant