-
Notifications
You must be signed in to change notification settings - Fork 1
security(dav): align authorization-path decoding with RFC 3986 single-decode semantics #1344
Copy link
Copy link
Open
Labels
area: apiAPI, protocol, event, or external contractAPI, protocol, event, or external contractarea: authAuthentication, authorization, identity, or tenant isolationAuthentication, authorization, identity, or tenant isolationarea: ci-cdCI, GitHub Actions, checks, release, or supply chainCI, GitHub Actions, checks, release, or supply chainarea: securitySecurity boundary, hardening, or vulnerability preventionSecurity boundary, hardening, or vulnerability preventionbugSomething isn't workingSomething isn't workingpriority: highHigh-priority or P1 workHigh-priority or P1 workstatus: triagedOpen issue has an organization taxonomy assignmentOpen issue has an organization taxonomy assignmenttype: securitySecurity vulnerability or security-specific remediationSecurity vulnerability or security-specific remediation
Description
Activity
Metadata
Metadata
Assignees
Labels
area: apiAPI, protocol, event, or external contractAPI, protocol, event, or external contractarea: authAuthentication, authorization, identity, or tenant isolationAuthentication, authorization, identity, or tenant isolationarea: ci-cdCI, GitHub Actions, checks, release, or supply chainCI, GitHub Actions, checks, release, or supply chainarea: securitySecurity boundary, hardening, or vulnerability preventionSecurity boundary, hardening, or vulnerability preventionbugSomething isn't workingSomething isn't workingpriority: highHigh-priority or P1 workHigh-priority or P1 workstatus: triagedOpen issue has an organization taxonomy assignmentOpen issue has an organization taxonomy assignmenttype: securitySecurity vulnerability or security-specific remediationSecurity vulnerability or security-specific remediation
Problem
_normalize_dav_authorization_path()currently decodes the same string repeatedly until stable, bounded by 100 rounds. PR #1341 proposes changing only that bound to 4 and labels the existing 100-round bound a MEDIUM DoS vulnerability.Fresh source review does not support that numeric-only remedy as a root-cause security fix:
Required bounded slice
Design and test an authorization-path boundary that distinguishes framework/request-target decoding from application decoding and rejects ambiguous nested encodings instead of relying on an arbitrary recursive-unquote count. Preserve rejection of traversal (
./..) and Windows separators, owner-scope isolation, and ordinary encoded path behavior.Use TDD at the authorization boundary with at least:
Do not weaken fail-closed owner scoping or replace the issue with another arbitrary decode-round constant.
Primary references
Berners-Lee, T., Fielding, R., & Masinter, L. (2005). Uniform Resource Identifier (URI): Generic Syntax (RFC 3986), §§2.4, 7.3. RFC Editor. https://doi.org/10.17487/RFC3986
MITRE. (2025). CWE-174: Double Decoding of the Same Data (CWE 4.19/4.20 lineage). Common Weakness Enumeration.
Related: #1341.