-
-
Notifications
You must be signed in to change notification settings - Fork 80.7k
fix(net-policy): nested sensitive query parameters bypass redaction in redactSensitiveUrlLikeString #102932
Copy link
Copy link
Closed
Labels
P2Normal backlog priority with limited blast radius.Normal backlog priority with limited blast radius.clawsweeper:needs-security-reviewClawSweeper marked this issue as needing security-sensitive review.ClawSweeper marked this issue as needing security-sensitive review.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:securitySecurity boundary, credential, authz, sandbox, or sensitive-data risk.Security boundary, credential, authz, sandbox, or sensitive-data risk.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.maturity:stableIssue affects a taxonomy feature currently scored M4/M5.Issue affects a taxonomy feature currently scored M4/M5.
Description
Metadata
Metadata
Assignees
Labels
P2Normal backlog priority with limited blast radius.Normal backlog priority with limited blast radius.clawsweeper:needs-security-reviewClawSweeper marked this issue as needing security-sensitive review.ClawSweeper marked this issue as needing security-sensitive review.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:securitySecurity boundary, credential, authz, sandbox, or sensitive-data risk.Security boundary, credential, authz, sandbox, or sensitive-data risk.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.maturity:stableIssue affects a taxonomy feature currently scored M4/M5.Issue affects a taxonomy feature currently scored M4/M5.
Type
Fields
Priority
None yet
Description
In
packages/net-policy/src/redact-sensitive-url.ts, the fallback URL query parameter redactor inredactSensitiveUrlLikeStringmatches parameters using a regular expression:The regex
/([?&])([^=&]+)=([^&]*)/gsplits parameters by&. However, if a query parameter contains a nested URL as its value (e.g.?redirect_url=https://example.com/login?token=secret), the regex matches?redirect_url=https://example.com/login?token=secret.Because
redirect_urlis not classified as a sensitive parameter name, the callback returns the entire matched substring untouched.Impact
The nested parameter
token=secretcompletely escapes redaction and is leaked into logs, creating a serious security issue when URLs are passed as arguments to redirect/auth paths.Suggested Fix
Perform nested parameter parsing or recursively scan query parameter values for nested query structures to ensure all layers of parameter lists are redacted.