CVE-2026-59728: @astrojs/rss XML Injection Vulnerability
MODERATECVE-2026-59728 is a MODERATE (CVSS 4.3) xml injection vulnerability (CWE-91: XML Injection (aka Blind XPath Injection)) affecting @astrojs/rss libraries in the npm ecosystem. The issue involves xml injection via unescaped rss feed fields. Remediation is available by upgrading affected packages to version 4.0.19.
CVE-2026-59728 at a Glance
Security Impact
CVSS: 4.3
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N).
How to Fix CVE-2026-59728
To remediate this vulnerability, upgrade all affected @astrojs/rss 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 @astrojs/rss@4.0.19
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls @astrojs/rss
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2026-59728, inspect your project dependencies using npm:
npm ls @astrojs/rss
Analyze the terminal output to locate any version of @astrojs/rss in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 4.0.19), your application is affected.
Note: The npm ls @astrojs/rss 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-91: XML Injection (aka Blind XPath Injection), where the product does not properly neutralize special elements that are used in xml, allowing attackers to modify the syntax, content, or commands of the xml before it is processed by an end system. In @astrojs/rss, 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-2026-59728 Affected @astrojs/rss Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
@astrojs/rss
|
npm |
≥ 1.0.0
< 4.0.19
|
4.0.19
|
References
Frequently Asked Questions
What is CVE-2026-59728?
Which @astrojs/rss versions are affected?
What version fixes CVE-2026-59728?
Is @astrojs/rss affected?
What is the CVSS score of CVE-2026-59728?
What CWE is associated with CVE-2026-59728?
How can I check npm dependencies for CVE-2026-59728?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-8j5q-mfj2-5q9q",
"modified" : "2026-08-12T20:37:28Z",
"published" : "2026-07-20T23:21:47Z",
"aliases" : [ "CVE-2026-59728" ],
"summary" : "@astrojs/rss: XML Injection via Unescaped RSS Feed Fields",
"details" : "## Summary\n\nIn `@astrojs/rss`, the `source.title` and `enclosure.type` item fields are interpolated directly into XML template strings without XML-character escaping before being parsed by `fast-xml-parser`. An attacker who controls these field values can inject arbitrary XML elements into the generated RSS feed.\n\n## Details\n\nTwo fields in `packages/astro-rss/src/index.ts` are affected:\n\n### `source.title`\n\n```typescript\nitem.source = parser.parse(\n `<source url=\"${result.source.url}\">${result.source.title}</source>`,\n).source;\n```\n\n`source.title` is validated only as `z.string()`, with no restriction on XML special characters. A value containing `</source>` followed by arbitrary XML is parsed as real XML elements, merging injected nodes into the RSS item.\n\n### `enclosure.type`\n\n```typescript\nitem.enclosure = parser.parse(\n `<enclosure url=\"${enclosureURL}\" length=\"${result.enclosure.length}\" type=\"${result.enclosure.type}\"/>`,\n).enclosure;\n```\n\n`enclosure.type` is also `z.string()` and is interpolated into an XML attribute without escaping. A value containing `\"` followed by additional XML can break out of the attribute and inject extra elements.\n\n## Proof of Concept\n\n`source.title` injection:\n\n```javascript\nsource: {\n url: 'https://legit.example.com',\n title: '</source><item><title>INJECTED</title><link>https://evil.com</link></item><source>',\n}\n// Result: RSS feed contains an injected <item> element with an evil.com link\n```\n\n`enclosure.type` injection:\n\n```javascript\nenclosure: {\n url: 'https://example.com/a.mp3',\n length: 0,\n type: 'audio/mpeg\" /><link>https://evil.example.com</link><enclosure fake=\"',\n}\n// Result: RSS feed contains an injected <link> element\n```\n\nBoth injections were confirmed with `fast-xml-parser`: the injected `\"link\": \"https://evil.com\"` appears in the parsed output.\n\n## Impact\n\nAn attacker who can control `source.title` or `enclosure.type` values (e.g., via a CMS, database, or user-submitted content that populates `RSSFeedItem`) can inject arbitrary XML into the generated RSS feed. This corrupts feed structure, injects false metadata (e.g., a fake `<link>` pointing to a malicious URL), and can cause feed readers to misparse or display attacker-controlled content. In SSR mode (`output: 'server'`), the poisoned feed is served on every request to all subscribers.\n\n## Patches\n\nFixed in `@astrojs/rss@4.0.19`.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "@astrojs/rss"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "1.0.0"
}, {
"fixed" : "4.0.19"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/withastro/astro/security/advisories/GHSA-8j5q-mfj2-5q9q"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-59728"
}, {
"type" : "WEB",
"url" : "https://github.com/withastro/astro/pull/17209"
}, {
"type" : "WEB",
"url" : "https://github.com/withastro/astro/commit/fbcfa039dfe3d700b239f595a6c55ee35e45bd06"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/withastro/astro"
}, {
"type" : "WEB",
"url" : "https://github.com/withastro/astro/releases/tag/@astrojs/rss@4.0.19"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-91" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2026-07-20T23:21:47Z",
"nvd_published_at" : "2026-07-27T21:17:05Z"
}
}