CVE-2025-65019
Astro Cloudflare adapter has a Stored Cross Site Scripting vulnerability in /_image endpoint
Astro is a web framework. Prior to version 5.15.9, when using Astro's Cloudflare adapter (@astrojs/cloudflare) with output: 'server', the image optimization endpoint (/_image) contains a critical vulnerability in the isRemoteAllowed() function that unconditionally allows data: protocol URLs. This enables Cross-Site Scripting (XSS) attacks through malicious SVG payloads, bypassing domain restrictions and Content Security Policy protections. This issue has been patched in version 5.15.9.
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- Low
- Privileges needed
- None
- User interaction
- Required
What an attacker can affect
- Confidentiality
- Low
- Integrity
- Low
- Availability
- None
Exploit likelihood
What each source reports
CVE List Score used
5.4
Astro Cloudflare adapter has a Stored Cross Site Scripting vulnerability in /_image endpoint
Astro is a web framework. Prior to version 5.15.9, when using Astro's Cloudflare adapter (@astrojs/cloudflare) with output: 'server', the image optimization endpoint (/_image) contains a critical vulnerability in the isRemoteAllowed() function that unconditionally allows data: protocol URLs. This enables Cross-Site Scripting (XSS) attacks through malicious SVG payloads, bypassing domain restrictions and Content Security Policy protections. This issue has been patched in version 5.15.9.
- Record
CVE-2025-65019- CVSS 3.1
- 5.4 Medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N - Weakness
- CWE-79
- Updated
- 2026-11-02
EUVDEUVD-2025-198182
5.4
Astro is a web framework. Prior to version 5.15.9, when using Astro's Cloudflare adapter (@astrojs/cloudflare) with output: 'server', the image optimization endpoint (/_image) contains a critical vulnerability in the isRemoteAllowed() function that unconditionally allows data: protocol URLs. This enables Cross-Site Scripting (XSS) attacks through malicious SVG payloads, bypassing domain restrictions and Content Security Policy protections. This issue has been patched in version 5.15.9.
- Record
EUVD-2025-198182- CVSS 3.1
- 5.4 Medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N - Updated
- 2026-11-02
GitHub AdvisoriesGHSA-fvmw-cj7j-j39q
5.4
Astro Cloudflare adapter has Stored Cross-site Scripting vulnerability in /_image endpoint
Summary
A Cross-Site Scripting (XSS) vulnerability exists in Astro when using the @astrojs/cloudflare adapter with output: 'server'. The built-in image optimization endpoint (/_image) uses isRemoteAllowed() from Astro’s internal helpers, which unconditionally allows data: URLs. When the endpoint receives a valid data: URL pointing to a malicious SVG containing JavaScript, and the Cloudflare-specific implementation performs a 302 redirect back to the original data: URL, the browser directly executes the embedded JavaScript. This completely bypasses any domain allow-listing (image.domains / image.remotePatterns) and typical Content Security Policy mitigations.
Affected Versions
@astrojs/cloudflare≤ 12.6.10 (and likely all previous versions)- Astro ≥ 4.x when used with
output: 'server'and the Cloudflare adapter
Root Cause – Vulnerable Code
File: node_modules/@astrojs/internal-helpers/src/remote.ts
export function isRemoteAllowed(src: string, ...): boolean {
if (!URL.canParse(src)) {
return false;
}
const url = new URL(src);
// Data URLs are always allowed
if (url.protocol === 'data:') {
return true;
}
// Non-http(s) protocols are never allowed
if (!['http:', 'https:'].includes(url.protocol)) {
return false;
}
// ... further http/https allow-list checks
}
In the Cloudflare adapter, the /_image endpoint contains logic similar to:
const href = ctx.url.searchParams.get('href');
if (!href) {
// return error
}
if (isRemotePath(href)) {
if (isRemoteAllowed(href, imageConfig) === false) {
// return error
} else {
//redirect to return the image
return Response.redirect(href, 302);
}
}
Because data: URLs are considered “allowed”, a request such as:
https://example.com/_image?href=data:image/svg+xml;base64,PHN2Zy... (base64-encoded malicious SVG)
triggers a 302 redirect directly to the data: URL, causing the browser to render and execute the malicious JavaScript inside the SVG.
Proof of Concept (PoC)
- Create a minimal Astro project with Cloudflare adapter (
output: 'server'). - Deploy to Cloudflare Pages or Workers.
- Request the image endpoint with the following payload:
https://yoursite.com/_image?href=data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxzY3JpcHQ+YWxlcnQoJ3pvbWFzZWMnKTwvc2NyaXB0Pjwvc3ZnPg==
(Base64 decodes to: <svg xmlns="http://www.w3.org/2000/svg"><script>alert('zomasec')</script></svg>)
- The endpoint returns a 302 redirect to the
data:URL → browser executes the<script>→alert()fires.
Impact
- Reflected/Strored XSS (depending on application usage)
- Session hijacking (access to cookies, localStorage, etc.)
- Account takeover when combined with CSRF
- Data exfiltration to attacker-controlled servers
- Bypasses
image.domains/image.remotePatternsconfiguration entirely
Safe vs Vulnerable Behavior
Other Astro adapters (Node, Vercel, etc.) typically proxy and rasterize SVGs, stripping JavaScript. The Cloudflare adapter currently redirects to remote resources (including data: URLs), making it uniquely vulnerable.
References
- Vulnerable function: https://github.com/withastro/astro/blob/main/packages/internal-helpers/src/remote.ts
- Similar
data:URL bypass in WordPress: CVE-2025-2575
- Record
GHSA-fvmw-cj7j-j39q- CVSS 3.1
- 5.4 Medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N - Weakness
- CWE-79
- Updated
- 2026-11-02
NVD
5.4
Astro is a web framework. Prior to version 5.15.9, when using Astro's Cloudflare adapter (@astrojs/cloudflare) with output: 'server', the image optimization endpoint (/_image) contains a critical vulnerability in the isRemoteAllowed() function that unconditionally allows data: protocol URLs. This enables Cross-Site Scripting (XSS) attacks through malicious SVG payloads, bypassing domain restrictions and Content Security Policy protections. This issue has been patched in version 5.15.9.
- Record
CVE-2025-65019- CVSS 3.1
- 5.4 Medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N - CVSS 3.1
- 6.1 Medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N - Weakness
- CWE-79
- Updated
- 2026-11-02
OSV
5.4
Astro Cloudflare adapter has a Stored Cross Site Scripting vulnerability in /_image endpoint
Astro is a web framework. Prior to version 5.15.9, when using Astro's Cloudflare adapter (@astrojs/cloudflare) with output: 'server', the image optimization endpoint (/_image) contains a critical vulnerability in the isRemoteAllowed() function that unconditionally allows data: protocol URLs. This enables Cross-Site Scripting (XSS) attacks through malicious SVG payloads, bypassing domain restrictions and Content Security Policy protections. This issue has been patched in version 5.15.9.
- Record
CVE-2025-65019- CVSS 3.1
- 5.4 Medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N - Weakness
- CWE-79
- Updated
- 2026-11-02
OSVGHSA-fvmw-cj7j-j39q
5.4
Astro Cloudflare adapter has Stored Cross-site Scripting vulnerability in /_image endpoint
Summary
A Cross-Site Scripting (XSS) vulnerability exists in Astro when using the @astrojs/cloudflare adapter with output: 'server'. The built-in image optimization endpoint (/_image) uses isRemoteAllowed() from Astro’s internal helpers, which unconditionally allows data: URLs. When the endpoint receives a valid data: URL pointing to a malicious SVG containing JavaScript, and the Cloudflare-specific implementation performs a 302 redirect back to the original data: URL, the browser directly executes the embedded JavaScript. This completely bypasses any domain allow-listing (image.domains / image.remotePatterns) and typical Content Security Policy mitigations.
Affected Versions
@astrojs/cloudflare≤ 12.6.10 (and likely all previous versions)- Astro ≥ 4.x when used with
output: 'server'and the Cloudflare adapter
Root Cause – Vulnerable Code
File: node_modules/@astrojs/internal-helpers/src/remote.ts
export function isRemoteAllowed(src: string, ...): boolean {
if (!URL.canParse(src)) {
return false;
}
const url = new URL(src);
// Data URLs are always allowed
if (url.protocol === 'data:') {
return true;
}
// Non-http(s) protocols are never allowed
if (!['http:', 'https:'].includes(url.protocol)) {
return false;
}
// ... further http/https allow-list checks
}
In the Cloudflare adapter, the /_image endpoint contains logic similar to:
const href = ctx.url.searchParams.get('href');
if (!href) {
// return error
}
if (isRemotePath(href)) {
if (isRemoteAllowed(href, imageConfig) === false) {
// return error
} else {
//redirect to return the image
return Response.redirect(href, 302);
}
}
Because data: URLs are considered “allowed”, a request such as:
https://example.com/_image?href=data:image/svg+xml;base64,PHN2Zy... (base64-encoded malicious SVG)
triggers a 302 redirect directly to the data: URL, causing the browser to render and execute the malicious JavaScript inside the SVG.
Proof of Concept (PoC)
- Create a minimal Astro project with Cloudflare adapter (
output: 'server'). - Deploy to Cloudflare Pages or Workers.
- Request the image endpoint with the following payload:
https://yoursite.com/_image?href=data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxzY3JpcHQ+YWxlcnQoJ3pvbWFzZWMnKTwvc2NyaXB0Pjwvc3ZnPg==
(Base64 decodes to: <svg xmlns="http://www.w3.org/2000/svg"><script>alert('zomasec')</script></svg>)
- The endpoint returns a 302 redirect to the
data:URL → browser executes the<script>→alert()fires.
Impact
- Reflected/Strored XSS (depending on application usage)
- Session hijacking (access to cookies, localStorage, etc.)
- Account takeover when combined with CSRF
- Data exfiltration to attacker-controlled servers
- Bypasses
image.domains/image.remotePatternsconfiguration entirely
Safe vs Vulnerable Behavior
Other Astro adapters (Node, Vercel, etc.) typically proxy and rasterize SVGs, stripping JavaScript. The Cloudflare adapter currently redirects to remote resources (including data: URLs), making it uniquely vulnerable.
References
- Vulnerable function: https://github.com/withastro/astro/blob/main/packages/internal-helpers/src/remote.ts
- Similar
data:URL bypass in WordPress: CVE-2025-2575
- Record
GHSA-fvmw-cj7j-j39q- CVSS 3.1
- 5.4 Medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N - Weakness
- CWE-79
- Updated
- 2026-11-02
Show 19 moreShow less
OSVCLSA-2026-1777855417 No score
TuxCare security update for astro (10 CVEs)
TuxCare rebuilt astro to address 10 CVEs. Fixed in 1.9.2-tuxcare.1.
- Record
CLSA-2026-1777855417- Updated
- 2026-11-02
OSVCLSA-2026-1777855422 No score
TuxCare security update for astro (10 CVEs)
TuxCare rebuilt astro to address 10 CVEs. Fixed in 0.26.1-tuxcare.1.
- Record
CLSA-2026-1777855422- Updated
- 2026-11-02
OSVCLSA-2026-1777941830 No score
TuxCare security update for astro (10 CVEs)
TuxCare rebuilt astro to address 10 CVEs. Fixed in 2.10.15-tuxcare.1.
- Record
CLSA-2026-1777941830- Updated
- 2026-11-02
OSVCLSA-2026-1778114666 No score
TuxCare security update for 5 packages (9 CVEs)
TuxCare rebuilt 5 packages to address 9 CVEs. Fixed in 4.16.19-tuxcare.1.
- Record
CLSA-2026-1778114666- Updated
- 2026-11-02
OSVCLSA-2026-1778633121 No score
TuxCare security update for astro (11 CVEs)
TuxCare rebuilt astro to address 11 CVEs. Fixed in 3.6.5-tuxcare.1.
- Record
CLSA-2026-1778633121- Updated
- 2026-11-02
OSVCLSA-2026-1792161544 No score
TuxCare security update for @astrojs/internal-helpers (11 CVEs)
TuxCare rebuilt @astrojs/internal-helpers to address 11 CVEs. Fixed in 2.10.15-tuxcare.1.
- Record
CLSA-2026-1792161544- Updated
- 2026-11-02
OSVCLSA-2026-1792161545 No score
TuxCare security update for @astrojs/internal-helpers (10 CVEs)
TuxCare rebuilt @astrojs/internal-helpers to address 10 CVEs. Fixed in 4.16.19-tuxcare.1.
- Record
CLSA-2026-1792161545- Updated
- 2026-11-02
OSVCLSA-2026-1792161546 No score
TuxCare security update for @astrojs/internal-helpers (13 CVEs)
TuxCare rebuilt @astrojs/internal-helpers to address 13 CVEs. Fixed in 3.6.5-tuxcare.1.
- Record
CLSA-2026-1792161546- Updated
- 2026-11-02
OSVCLSA-2026-1792161681 No score
TuxCare security update for @astrojs/prism (10 CVEs)
TuxCare rebuilt @astrojs/prism to address 10 CVEs. Fixed in 1.9.2-tuxcare.1.
- Record
CLSA-2026-1792161681- Updated
- 2026-11-02
OSVCLSA-2026-1792161682 No score
TuxCare security update for @astrojs/prism (10 CVEs)
TuxCare rebuilt @astrojs/prism to address 10 CVEs. Fixed in 0.26.1-tuxcare.1.
- Record
CLSA-2026-1792161682- Updated
- 2026-11-02
OSVCLSA-2026-1792161683 No score
TuxCare security update for @astrojs/prism (11 CVEs)
TuxCare rebuilt @astrojs/prism to address 11 CVEs. Fixed in 2.10.15-tuxcare.1.
- Record
CLSA-2026-1792161683- Updated
- 2026-11-02
OSVCLSA-2026-1792161684 No score
TuxCare security update for @astrojs/prism (10 CVEs)
TuxCare rebuilt @astrojs/prism to address 10 CVEs. Fixed in 4.16.19-tuxcare.1.
- Record
CLSA-2026-1792161684- Updated
- 2026-11-02
OSVCLSA-2026-1792161686 No score
TuxCare security update for @astrojs/prism (13 CVEs)
TuxCare rebuilt @astrojs/prism to address 13 CVEs. Fixed in 3.6.5-tuxcare.1.
- Record
CLSA-2026-1792161686- Updated
- 2026-11-02
OSVCLSA-2026-1792161759 No score
TuxCare security update for @astrojs/studio (10 CVEs)
TuxCare rebuilt @astrojs/studio to address 10 CVEs. Fixed in 4.16.19-tuxcare.1.
- Record
CLSA-2026-1792161759- Updated
- 2026-11-02
OSVCLSA-2026-1792161775 No score
TuxCare security update for @astrojs/underscore-redirects (11 CVEs)
TuxCare rebuilt @astrojs/underscore-redirects to address 11 CVEs. Fixed in 2.10.15-tuxcare.1.
- Record
CLSA-2026-1792161775- Updated
- 2026-11-02
OSVCLSA-2026-1792161776 No score
TuxCare security update for @astrojs/underscore-redirects (10 CVEs)
TuxCare rebuilt @astrojs/underscore-redirects to address 10 CVEs. Fixed in 4.16.19-tuxcare.1.
- Record
CLSA-2026-1792161776- Updated
- 2026-11-02
OSVCLSA-2026-1792161777 No score
TuxCare security update for @astrojs/underscore-redirects (13 CVEs)
TuxCare rebuilt @astrojs/underscore-redirects to address 13 CVEs. Fixed in 3.6.5-tuxcare.1.
- Record
CLSA-2026-1792161777- Updated
- 2026-11-02
OSVCLSA-2026-1792161847 No score
TuxCare security update for @astrojs/upgrade (10 CVEs)
TuxCare rebuilt @astrojs/upgrade to address 10 CVEs. Fixed in 4.16.19-tuxcare.1.
- Record
CLSA-2026-1792161847- Updated
- 2026-11-02
OSVCLSA-2026-1792161848 No score
TuxCare security update for @astrojs/upgrade (13 CVEs)
TuxCare rebuilt @astrojs/upgrade to address 13 CVEs. Fixed in 3.6.5-tuxcare.1.
- Record
CLSA-2026-1792161848- Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
astronpm |
before 5.15.9 | 5.15.9 |
astroTuxCare:npm From an advisory covering 10 CVEs |
1.9.2-tuxcare.0 up to 1.9.2-tuxcare.1, plus listed versions 1.9.2 |
1.9.2-tuxcare.1 |
astroTuxCare:npm From an advisory covering 10 CVEs |
0.26.1-tuxcare.0 up to 0.26.1-tuxcare.1, plus listed versions 0.26.1 |
0.26.1-tuxcare.1 |
astroTuxCare:npm From an advisory covering 10 CVEs |
2.10.15-tuxcare.0 up to 2.10.15-tuxcare.1, plus listed versions 2.10.15 |
2.10.15-tuxcare.1 |
@astrojs/dbTuxCare:npm From an advisory covering 8 CVEs |
4.16.19-tuxcare.0 up to 4.16.19-tuxcare.1, plus listed versions 4.16.19 |
4.16.19-tuxcare.1 |
@astrojs/rssTuxCare:npm From an advisory covering 8 CVEs |
4.16.19-tuxcare.0 up to 4.16.19-tuxcare.1, plus listed versions 4.16.19 |
4.16.19-tuxcare.1 |
@astrojs/telemetryTuxCare:npm From an advisory covering 8 CVEs |
4.16.19-tuxcare.0 up to 4.16.19-tuxcare.1, plus listed versions 4.16.19 |
4.16.19-tuxcare.1 |
astroTuxCare:npm From an advisory covering 8 CVEs |
4.16.19-tuxcare.0 up to 4.16.19-tuxcare.1, plus listed versions 4.16.19 |
4.16.19-tuxcare.1 |
create-astroTuxCare:npm From an advisory covering 8 CVEs |
4.16.19-tuxcare.0 up to 4.16.19-tuxcare.1, plus listed versions 4.16.19 |
4.16.19-tuxcare.1 |
astroTuxCare:npm From an advisory covering 11 CVEs |
3.6.5-tuxcare.0 up to 3.6.5-tuxcare.1, plus listed versions 3.6.5 |
3.6.5-tuxcare.1 |
Show 14 moreShow less
| Package | Affected | Fixed |
|---|---|---|
@astrojs/internal-helpersTuxCare:npm From an advisory covering 11 CVEs |
2.10.15-tuxcare.0 up to 2.10.15-tuxcare.1, plus listed versions 2.10.15 |
2.10.15-tuxcare.1 |
@astrojs/internal-helpersTuxCare:npm From an advisory covering 9 CVEs |
4.16.19-tuxcare.0 up to 4.16.19-tuxcare.1, plus listed versions 4.16.19 |
4.16.19-tuxcare.1 |
@astrojs/internal-helpersTuxCare:npm From an advisory covering 13 CVEs |
3.6.5-tuxcare.0 up to 3.6.5-tuxcare.1, plus listed versions 3.6.5 |
3.6.5-tuxcare.1 |
@astrojs/prismTuxCare:npm From an advisory covering 10 CVEs |
1.9.2-tuxcare.0 up to 1.9.2-tuxcare.1, plus listed versions 1.9.2 |
1.9.2-tuxcare.1 |
@astrojs/prismTuxCare:npm From an advisory covering 10 CVEs |
0.26.1-tuxcare.0 up to 0.26.1-tuxcare.1, plus listed versions 0.26.1 |
0.26.1-tuxcare.1 |
@astrojs/prismTuxCare:npm From an advisory covering 11 CVEs |
2.10.15-tuxcare.0 up to 2.10.15-tuxcare.1, plus listed versions 2.10.15 |
2.10.15-tuxcare.1 |
@astrojs/prismTuxCare:npm From an advisory covering 9 CVEs |
4.16.19-tuxcare.0 up to 4.16.19-tuxcare.1, plus listed versions 4.16.19 |
4.16.19-tuxcare.1 |
@astrojs/prismTuxCare:npm From an advisory covering 13 CVEs |
3.6.5-tuxcare.0 up to 3.6.5-tuxcare.1, plus listed versions 3.6.5 |
3.6.5-tuxcare.1 |
@astrojs/studioTuxCare:npm From an advisory covering 9 CVEs |
4.16.19-tuxcare.0 up to 4.16.19-tuxcare.1, plus listed versions 4.16.19 |
4.16.19-tuxcare.1 |
@astrojs/underscore-redirectsTuxCare:npm From an advisory covering 11 CVEs |
2.10.15-tuxcare.0 up to 2.10.15-tuxcare.1, plus listed versions 2.10.15 |
2.10.15-tuxcare.1 |
@astrojs/underscore-redirectsTuxCare:npm From an advisory covering 9 CVEs |
4.16.19-tuxcare.0 up to 4.16.19-tuxcare.1, plus listed versions 4.16.19 |
4.16.19-tuxcare.1 |
@astrojs/underscore-redirectsTuxCare:npm From an advisory covering 13 CVEs |
3.6.5-tuxcare.0 up to 3.6.5-tuxcare.1, plus listed versions 3.6.5 |
3.6.5-tuxcare.1 |
@astrojs/upgradeTuxCare:npm From an advisory covering 9 CVEs |
4.16.19-tuxcare.0 up to 4.16.19-tuxcare.1, plus listed versions 4.16.19 |
4.16.19-tuxcare.1 |
@astrojs/upgradeTuxCare:npm From an advisory covering 13 CVEs |
3.6.5-tuxcare.0 up to 3.6.5-tuxcare.1, plus listed versions 3.6.5 |
3.6.5-tuxcare.1 |
History
| Recorded | Changed | Sources |
|---|---|---|
| affected, facts | ||
| first indexed | CVE List, EUVD, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2025-65019 is a medium vulnerability (CVSS 5.4) in Astro, published November 19, 2025. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.27%, the 19th percentile. Fixed in astro 5.15.9.
References
github.com/withastro/astro/security/advisories/GHSA-fvmw-cj7j-j39q
github.com/withastro/astro/commit/9e9c528191b6f5e06db9daf6ad26b8f68016e533
nvd.nist.gov/vuln/detail/CVE-2025-65019
github.com/advisories/GHSA-fvmw-cj7j-j39q
github.com/CVEProject/cvelistV5/tree/main/cves/2025/65xxx/CVE-2025-65019.json
github.com/withastro/astro