Vulnerabilities in pkg:npm/@astrojs/rss

PACKAGE
Advisory Identifier: GHSA-8j5q-mfj2-5q9q
Advisory Summary

CVE-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.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:npm/@astrojs/rss

1 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:npm/@astrojs/rss. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-8j5q-mfj2-5q9q CVE-2026-59728 MODERATE @astrojs/rss: XML Injection via Unescaped RSS Feed Fields

CVE-2026-59728 at a Glance

CVE Identifier CVE-2026-59728
GHSA Identifier GHSA-8j5q-mfj2-5q9q
Severity MODERATE
CVSS v3.1 Base Score 4.3
CWE Classification CWE-91: XML Injection (aka Blind XPath Injection)
Affected Product @astrojs/rss
Package Ecosystem npm
Published Date
Last Updated

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).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction Required (UI:R)
Scope Unchanged (S:U)
Confidentiality None (C:N)
Integrity Low (I:L)
Availability None (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.

@astrojs/rss fixed: 4.0.19
npm install @astrojs/rss@4.0.19
Verify Direct and Transitive Dependencies

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

## Summary In `@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. ## Details Two fields in `packages/astro-rss/src/index.ts` are affected: ### `source.title` ```typescript item.source = parser.parse( `<source url="${result.source.url}">${result.source.title}</source>`, ).source; ``` `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. ### `enclosure.type` ```typescript item.enclosure = parser.parse( `<enclosure url="${enclosureURL}" length="${result.enclosure.length}" type="${result.enclosure.type}"/>`, ).enclosure; ``` `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. ## Proof of Concept `source.title` injection: ```javascript source: { url: 'https://legit.example.com', title: '</source><item><title>INJECTED</title><link>https://evil.com</link></item><source>', } // Result: RSS feed contains an injected <item> element with an evil.com link ``` `enclosure.type` injection: ```javascript enclosure: { url: 'https://example.com/a.mp3', length: 0, type: 'audio/mpeg" /><link>https://evil.example.com</link><enclosure fake="', } // Result: RSS feed contains an injected <link> element ``` Both injections were confirmed with `fast-xml-parser`: the injected `"link": "https://evil.com"` appears in the parsed output. ## Impact An 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. ## Patches Fixed in `@astrojs/rss@4.0.19`.

CVE-2026-59728 Affected @astrojs/rss Versions

1 component(s)
Fixed Versions:
4.0.19
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?
CVE-2026-59728 is a security vulnerability in @astrojs/rss involving XML Injection via Unescaped RSS Feed Fields under CWE-91: XML Injection (aka Blind XPath Injection).
Which @astrojs/rss versions are affected?
Affected versions include releases prior to 4.0.19 across affected packages: @astrojs/rss.
What version fixes CVE-2026-59728?
Upgrading to 4.0.19 (or the latest patched release for your respective branch) resolves the vulnerability.
Is @astrojs/rss affected?
Yes, @astrojs/rss is affected in releases prior to 4.0.19. Upgrade your dependency to 4.0.19 or later.
What is the CVSS score of CVE-2026-59728?
CVE-2026-59728 has a CVSS v3.1 base score of 4.3 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N.
What CWE is associated with CVE-2026-59728?
CVE-2026-59728 is classified under CWE-91: XML Injection (aka Blind XPath Injection) (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.).
How can I check npm dependencies for CVE-2026-59728?
Run the dependency tree command: 'npm ls @astrojs/rss'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "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"
  }
}