How to fix: Cookie Path Crosses Application Boundary
A cookie with Path=/ is accessible to every route on the host, including routes served by different applications (e.g., /admin, /api, /blog). This broadens the cookie's exposure across trust boundaries.
Why it matters
An XSS vulnerability in a low-privilege application route (e.g., /blog) can steal session cookies intended only for /admin because all routes share the same cookie jar with Path=/.
Path=/ makes the cookie available to every route on the host. When a server runs multiple applications under different path prefixes, this means a cookie from one application is sent to all others, widening the XSS blast radius.
How to fix it
- 1Set the narrowest Path that the application actually needs.
- 2Use Path=/admin for admin-only cookies, Path=/api for API tokens, etc.
- 3For cookies that genuinely must be site-wide, ensure all paths enforce the same security controls.
Code examples
Narrowly scoped path
Set-Cookie: admin-session=abc123; HttpOnly; Secure; SameSite=Strict; Path=/adminReferences
Detected automatically by VulnRadar. The check id is cookie-path-cross-app, stable across every scan so you can filter or diff on it.
More cookies checks
- LowCookie Domain Attribute Is Too Broad
- LowCookie Missing Secure Attribute
- InfoThird-Party Cookie Missing Partitioned Attribute
- High__Host- Prefix Cookie Missing Secure Attribute
- High__Host- Prefix Cookie with Non-Root Path
- High__Secure- Prefix Cookie Missing Secure Attribute
- LowCookie Expires/Max-Age Exceeds 1 Year
- InfoCookie Name Leaks Framework or Language
Questions
- How severe is Cookie Path Crosses Application Boundary?
- VulnRadar rates this medium severity in the cookies category. The severity is fixed per check, not scored per site, so the same finding is the same severity on every scan.
- Does VulnRadar check for this automatically?
- Yes. It runs as part of every scan under the check id cookie-path-cross-app, which stays the same between runs so you can filter, diff, or gate CI on it.
Missing a check?
The detection set is open. If you know a misconfiguration this does not catch, propose it: the issue template asks for the threat model, how to detect it, the false-positive risk, and a test fixture, which is the same thing a maintainer would have to work out anyway.