CVE-2025-64757: Astro Astro Development Server Has Arbitrary Vulnerability
LOWCVE-2025-64757 is a LOW (CVSS 3.5) astro development server has arbitrary vulnerability (CWE-23: Relative Path Traversal) affecting Astro libraries in the npm ecosystem. The issue involves astro development server has arbitrary local file read. Remediation is available by upgrading affected packages to version 5.14.3.
CVE-2025-64757 at a Glance
Security Impact
CVSS: 3.5
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:A/AC:L/PR:N/UI:R/S:U/C:L/I:N/A:N).
How to Fix CVE-2025-64757
To remediate this vulnerability, upgrade all affected Astro dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install astro@5.14.3
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls astro
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2025-64757, inspect your project dependencies using npm:
npm ls astro
Analyze the terminal output to locate any version of Astro in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 5.14.3), your application is affected.
Note: The npm ls astro command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-23: Relative Path Traversal, where the product uses external input to construct a pathname that should be within a restricted directory, but it does not properly neutralize sequences such as ".." that can resolve to a location that is outside of that directory. In Astro, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2025-64757 Affected Astro Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
astro
|
npm |
< 5.14.3
|
5.14.3
|
References
Frequently Asked Questions
What is CVE-2025-64757?
Which Astro versions are affected?
What version fixes CVE-2025-64757?
Is astro affected?
What is the CVSS score of CVE-2025-64757?
What CWE is associated with CVE-2025-64757?
How can I check npm dependencies for CVE-2025-64757?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-x3h8-62x9-952g",
"modified" : "2025-11-19T19:43:05Z",
"published" : "2025-11-19T19:43:05Z",
"aliases" : [ "CVE-2025-64757" ],
"summary" : "Astro Development Server has Arbitrary Local File Read",
"details" : "### Summary\nA vulnerability has been identified in the Astro framework's development server that allows arbitrary local file read access through the image optimization endpoint. The vulnerability affects Astro development environments and allows remote attackers to read any image file accessible to the Node.js process on the host system.\n\n### Details\n- **Title**: Arbitrary Local File Read in Astro Development Image Endpoint\n- **Type**: CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')\n- **Component**: `/packages/astro/src/assets/endpoint/node.ts`\n- **Affected Versions**: Astro v5.x development builds (confirmed v5.13.3)\n- **Attack Vector**: Network (HTTP GET request)\n- **Authentication Required**: None\n\nThe vulnerability exists in the Node.js image endpoint handler used during development mode. The endpoint accepts an `href` parameter that specifies the path to an image file. In development mode, this parameter is processed without adequate path validation, allowing attackers to specify absolute file paths.\n\n**Vulnerable Code Location**: `packages/astro/src/assets/endpoint/node.ts`\n\n```typescript\n// Vulnerable code in development mode\nif (import.meta.env.DEV) {\n fileUrl = pathToFileURL(removeQueryString(replaceFileSystemReferences(src)));\n} else {\n // Production has proper path validation\n // ... security checks omitted in dev mode\n}\n```\n\nThe development branch bypasses the security checks that exist in the production code path, which validates that file paths are within the allowed assets directory.\n\n### PoC\n#### Attack Prerequisites\n1. Astro development server must be running (`astro dev`)\n2. The `/_image` endpoint must be accessible to the attacker\n3. Target image files must be readable by the Node.js process\n\n#### Exploit Steps\n\n1. Start Astro Development Server:\n ```bash\n astro dev # Typically runs on http://localhost:4321\n ```\n\n2. Craft Malicious Request:\n ```http\n GET /_image?href=/[ABSOLUTE_PATH_TO_IMAGE]&w=100&h=100&f=png HTTP/1.1\n Host: localhost:4321\n ```\n\n3. Example Attack:\n ```bash\n curl \"http://localhost:4321/_image?href=/%2FSystem%2FLibrary%2FImage%20Capture%2FAutomatic%20Tasks%2FMakePDF.app%2FContents%2FResources%2F0blank.jpg&w=100&h=100&f=png\" -o stolen.png\n ```\n\n#### Demonstration Results\n\n**Test Environment**: macOS with Astro v5.13.3\n\n**Successful Exploitation**:\n- Target: `/System/Library/Image Capture/Automatic Tasks/MakePDF.app/Contents/Resources/0blank.jpg`\n- Response: HTTP 200 OK, Content-Type: image/png\n- Exfiltration: 303 bytes (100x100 PNG)\n- File Created: `stolen-image.png` containing processed system image\n\n**Attack Payload**:\n```\nhttp://localhost:4321/_image?href=/%2FSystem%2FLibrary%2FImage%20Capture%2FAutomatic%20Tasks%2FMakePDF.app%2FContents%2FResources%2F0blank.jpg&w=100&h=100&f=png\n```\n\n**Server Response**:\n```\nStatus: 200 OK\nContent-Type: image/png\nContent-Length: 303\n```\n\n### Impact\n\n#### Confidentiality Impact: HIGH\n- **Scope**: Any image file readable by the Node.js process\n- **Exfiltration Method**: Complete file contents via HTTP response (transformed to PNG)\n\n#### Integrity Impact: NONE\n- The vulnerability only allows reading files, not modification\n\n#### Availability Impact: NONE \n- No direct impact on system availability\n- Potential for resource exhaustion through repeated large image requests\n\n### Affected Components\n\n#### Primary Component\n- **File**: `packages/astro/src/assets/endpoint/node.ts`\n- **Function**: `loadLocalImage()`\n- **Lines**: Development mode branch (~25-35)\n\n#### Secondary Components \n- **File**: `packages/astro/src/assets/endpoint/generic.ts`\n- **Impact**: Uses different code path, not directly vulnerable\n- **Note**: Implements proper remote allowlist validation",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:A/AC:L/PR:N/UI:R/S:U/C:L/I:N/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "astro"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "5.14.3"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/withastro/astro/security/advisories/GHSA-x3h8-62x9-952g"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-64757"
}, {
"type" : "WEB",
"url" : "https://github.com/withastro/astro/commit/b8ca69b97149becefaf89bf21853de9c905cdbb7"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/withastro/astro"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-22", "CWE-23" ],
"severity" : "LOW",
"github_reviewed" : true,
"github_reviewed_at" : "2025-11-19T19:43:05Z",
"nvd_published_at" : "2025-11-19T17:15:52Z"
}
}