DEV Community

facilishz
facilishz

Posted on

Pangolin's Public Path Rules Need One Canonical Interpretation

Pangolin's Public Path Rules Need One Canonical Interpretation

Path matching looks like a small implementation detail until it decides whether authentication is required. Pangolin CVE-2026-136132 exposes that decision boundary.

The issue

CVE-2026-136132 affects Pangolin before 1.21.0. The isPathAllowed() logic in server/lib/pathMatch.ts split paths on literal slashes without first percent-decoding them or resolving dot segments. An unauthenticated attacker could send a path that matched a public bypass rule while the backend interpreted the same request as a protected path. The advisory assigns CVSS 4.0 score 9.2 and CVSS 3.1 score 8.6. Version 1.21.0 is listed as fixed.

The parser gap

Reverse proxies, web servers, application routers, and backend frameworks do not always normalize a request path at the same stage or in the same way. If the authorization layer sees literal %2F or unresolved dot segments but the backend treats them as separators and traversal, the two components can disagree about which resource is being requested. The result is an authorization bypass rather than a classic file-system traversal.

Who should care

The problem is most relevant when a deployment uses public bypass rules for health checks, static assets, login endpoints, or other unauthenticated paths. A protected application behind those rules may be more exposed than the admin interface suggests. Pangolin deployments that rely only on network location and assume the proxy always makes the final path decision should review the configuration first.

Remediation

Upgrade to Pangolin 1.21.0 or later. Review every public bypass rule and remove broad prefixes that do not need to be anonymous. At the edge, reject ambiguous encoded path forms or normalize them once before authorization and routing. Do not let two layers make security decisions on different path representations. Test a small set of benign encoded and dot-segment variants against public and protected routes in a controlled environment.

Detection

Review proxy and application logs for percent-encoded separators, repeated slashes, and dot segments on protected routes. Compare the path seen by Pangolin with the route recorded by the backend. Repeated requests that match a public rule but reach a protected application deserve investigation. If sensitive content may have been served, identify the accounts, data, and sessions involved and follow the application's incident process.

Design lesson

Authorization should operate on the same canonical path that routing ultimately uses. A small mismatch between two parsers can invert the intended access policy even when both implement reasonable local behavior.

References

Top comments (0)