Home / withastro / astro / CVE-2024-56159
CVE-2024-56159: is it exploited, and which versions of withastro astro are affected and fixed?
CVE-2024-56159 is a storage of File with Sensitive Data Under Web Root vulnerability in withastro astro. It is not known to be exploited: it is not in CISA's Known Exploited Vulnerabilities catalog (catalog 2026.11.30, read December 3, 2026, 14:38 UTC). Affected: astro from 5.0.0-alpha.0 before 5.0.8 and astro before 4.16.18 (GitHub advisory GHSA-49w6-73cw-chjr). Fixed in 5.0.8 and 4.16.18 (GitHub advisory GHSA-49w6-73cw-chjr). Severity: High (7.8, CVSS 4.0, from GitHub_M).
Data checked December 3, 2026: last read CISA KEV December 3, 2026, 14:38 UTC, CVE record November 19, 2026, 07:10 UTC and NVD November 19, 2026, 07:24 UTC.
What is CVE-2024-56159?
Server source code is exposed to the public if sourcemaps are enabled
Astro is a web framework for content-driven websites. A bug in the build process allows any unauthenticated user to read parts of the server source code. During build, along with client assets such as css and font files, the sourcemap files **for the server code** are moved to a publicly-accessible folder. Any outside party can read them with an unauthorized HTTP GET request to the same server hosting the rest of the website. While some server files are hashed, making their access obscure, the files corresponding to the file system router (those in `src/pages`) are predictably named. For example. the sourcemap file for `src/pages/index.astro` gets named `dist/client/pages/index.astro.mjs.map`. This vulnerability is the root cause of issue #12703, which links to a simple stackblitz project demonstrating the vulnerability. Upon build, notice the contents of the `dist/client` (referred to as `config.build.client` in astro code) folder. All astro servers make the folder in question accessible to the public internet without any authentication. It contains `.map` files corresponding to the code that runs on the server. All **server-output** projects on Astro 5 versions **v5.0.3** through **v5.0.7**, that have **sourcemaps enabled**, either directly or through an add-on such as `sentry`, are affected. The fix for **server-output** projects was released in **[email protected]**. Additionally, all **static-output** projects built using Astro 4 versions **4.16.17 or older**, or Astro 5 versions **5.0.8 or older**, that have **sourcemaps enabled** are also affected. The fix for **static-output** projects was released in **[email protected]**, and backported to Astro v4 in **[email protected]**. The immediate impact is limited to source code. Any secrets or environment variables are not exposed unless they are present verbatim in the source code. There is no immediate loss of integrity within the the vulnerable server. However, it is possible to subsequently discover another vulnerability via the revealed source code . There is no immediate impact to availability of the vulnerable server. However, the presence of an unsafe regular expression, for example, can quickly be exploited to subsequently compromise the availability. The fix for **server-output** projects was released in **[email protected]**, and the fix for **static-output** projects was released in **[email protected]** and backported to Astro v4 in **[email protected]**. Users are advised to update immediately if they are using sourcemaps or an integration that enables sourcemaps.
From the CVE record by GitHub_M, last updated December 20, 2024, 20:44 UTC.
Which versions are affected, and which fix it?
| Vendor | Product | Affected | Fixed or not affected from |
|---|---|---|---|
| withastro | astro | >= 5.0.0, < 5.0.8 < 4.16.18 |
As the CVE record by GitHub_M states it, last updated December 20, 2024. Version ranges are the CNA's; a version the record calls not affected is usually the fix.
Which packages are affected, and in which version is each fixed?
| Ecosystem | Package | Affected | Fixed in | Advisory |
|---|---|---|---|---|
| npm | astro | >= 5.0.0-alpha.0, < 5.0.8 | 5.0.8 | GHSA-49w6-73cw-chjr |
| npm | astro | < 4.16.18 | 4.16.18 | GHSA-49w6-73cw-chjr |
GitHub Advisory Database, reviewed advisories (CC BY 4.0); advisory updated November 27, 2025. Summary: Astro's server source code is exposed to the public if sourcemaps are enabled.
Which products and versions does the NVD list as affected?
| Vendor | Product | Versions | Type |
|---|---|---|---|
| astro | astro | before 4.16.18 | application |
| astro | astro | from 5.0.0 before 5.0.8 | application |
NVD analysis (status Analyzed), last modified June 17, 2026, 08:11 UTC.
How severe is CVE-2024-56159?
| Score | Version | Vector | Source |
|---|---|---|---|
| High 7.8 | CVSS 4.0 | CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:N/VA:N/SC:H/SI:L/SA:L | GitHub_M |
| Medium 5.3 | CVSS 3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N | NVD |
Each score is shown as its source gave it: the CNA that wrote the record, CISA's ADP (vulnrichment) and the NVD. They can differ.
What the ratings mean: in CVSS 3 and 4, scores run from 0 to 10, with Low 0.1 to 3.9, Medium 4.0 to 6.9, High 7.0 to 8.9 and Critical 9.0 to 10.0. CVSS 2 has no Critical band: its High runs from 7.0 to 10.0. The vector lists how the flaw is reached (network, local), what an attacker needs (privileges, a user's click) and what it can harm.
Is CVE-2024-56159 exploited in the wild?
- CISA KEV
- Not listed (catalog 2026.11.30)
- CISA SSVC
- Exploitation: poc; automatable: yes; technical impact: partial (CISA ADP, December 20, 2024)
- EPSS
- 1.54% probability of exploitation activity in the next 30 days, percentile 75.7 (FIRST EPSS, scores of December 3, 2026)
What kind of flaw is it?
- CWE-219 Storage of File with Sensitive Data Under Web Root
Where are the vendor advisories and references?
- https://github.com/withastro/astro/security/advisories/GHSA-49w6-73cw-chjr x_refsource_CONFIRM
- https://github.com/withastro/astro/issues/12703 x_refsource_MISC
- https://github.com/getsentry/sentry-javascript/blob/develop/packages/astro/src/integration/index.ts#L50 x_refsource_MISC
- https://github.com/withastro/astro/blob/176fe9f113fd912f9b61e848b00bbcfecd6d5c2c/packages/astro/src/core/build/static-build.ts#L139 x_refsource_MISC
When was it published, and where is the official record?
- Reserved
- December 17, 2024
- Published
- December 19, 2024, 18:58 UTC
- CVE record updated
- December 20, 2024, 20:44 UTC by GitHub_M
- NVD
- Analyzed, last modified June 17, 2026, 08:11 UTC
- Last checked
- CVE list November 19, 2026, 07:10 UTC; NVD November 19, 2026, 07:24 UTC; KEV December 3, 2026, 14:38 UTC; EPSS December 3, 2026
- Official record
- cve.org · NVD
What other CVEs affect astro?
- Nov 12, 2026CVE-2026-126365 withastro astro: cross-site scripting (XSS)
- Nov 12, 2026CVE-2026-126364 withastro astro: path traversal (reading or writing files outside the intended folder)
- Nov 12, 2026CVE-2026-126363 withastro astro: cross-site scripting (XSS)
- Nov 12, 2026CVE-2026-126362 withastro astro: cross-site scripting (XSS)
- Nov 12, 2026CVE-2026-126361 withastro astro: cross-site scripting (XSS)
- Oct 21, 2026CVE-2026-114128 withastro astro: cross-site scripting (XSS)
- Oct 21, 2026CVE-2026-114127 withastro astro: cross-site scripting (XSS)
- Sep 30, 2026CVE-2026-102984 withastro astro: uncaught exception (crash)
Questions about CVE-2024-56159
Is CVE-2024-56159 exploited in the wild?
Not as far as CISA knows: it is not in the Known Exploited Vulnerabilities catalog, read December 3, 2026, 14:38 UTC. FIRST's EPSS gives it a 1.54% chance of exploitation activity in the next 30 days (scores of December 3, 2026).
Which versions of withastro astro are affected by CVE-2024-56159?
astro from 5.0.0-alpha.0 before 5.0.8 and astro before 4.16.18, per the GitHub advisory GHSA-49w6-73cw-chjr. The tables above give every range the sources list.
Which version fixes CVE-2024-56159?
5.0.8 and 4.16.18, per the GitHub advisory GHSA-49w6-73cw-chjr. Check the vendor's advisory before you rely on it.
How severe is CVE-2024-56159?
High (7.8, CVSS 4.0, from GitHub_M). The severity table above shows each score with its source.
Where is the official record of CVE-2024-56159?
The CVE Program's record is at cve.org and the NVD's at nvd.nist.gov. For a fix, the vendor's own advisory is the one to follow.