GHSA-whqg-ppgf-wp8c

Suggest an improvement
Source
https://github.com/advisories/GHSA-whqg-ppgf-wp8c
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2025/12/GHSA-whqg-ppgf-wp8c/GHSA-whqg-ppgf-wp8c.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-whqg-ppgf-wp8c
Aliases
Related
Published
2025-12-08T16:26:43Z
Modified
2025-12-09T17:33:19.681381Z
Severity
  • 6.5 (Medium) CVSS_V3 - CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N CVSS Calculator
Summary
Astro has an Authentication Bypass via Double URL Encoding, a bypass for CVE-2025-64765
Details

Authentication Bypass via Double URL Encoding in Astro

Bypass for CVE-2025-64765 / GHSA-ggxq-hp9w-j794


Summary

A double URL encoding bypass allows any unauthenticated attacker to bypass path-based authentication checks in Astro middleware, granting unauthorized access to protected routes. While the original CVE-2025-64765 (single URL encoding) was fixed in v5.15.8, the fix is insufficient as it only decodes once. By using double-encoded URLs like /%2561dmin instead of /%61dmin, attackers can still bypass authentication and access protected resources such as /admin, /api/internal, or any route protected by middleware pathname checks.

Fix

A more secure fix is just decoding once, then if the request has a %xx format, return a 400 error by using something like :

if (containsEncodedCharacters(pathname)) {
            // Multi-level encoding detected - reject request
            return new Response(
                'Bad Request: Multi-level URL encoding is not allowed',
                {
                    status: 400,
                    headers: { 'Content-Type': 'text/plain' }
                }
            );
        }
Database specific
{
    "github_reviewed": true,
    "nvd_published_at": "2025-12-09T00:15:48Z",
    "github_reviewed_at": "2025-12-08T16:26:43Z",
    "severity": "MODERATE",
    "cwe_ids": [
        "CWE-647"
    ]
}
References

Affected packages

npm / astro

Package

Affected ranges

Type
SEMVER
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
5.15.8