Vulnerabilities |
8 via 21 paths |
|---|---|
Dependencies |
212 |
Source |
GitHub |
Find, fix and prevent vulnerabilities in your code.
high severity
new
- Vulnerable module: domutils
- Introduced through: astro@7.4.14 and astro-icon@1.2.0
Detailed paths
-
Introduced through: @arthelokyo/astrowind@onwidget/astrowind › astro@7.4.14 › svgo@4.1.0 › css-select@6.0.0 › domutils@3.2.2
-
Introduced through: @arthelokyo/astrowind@onwidget/astrowind › astro-icon@1.2.0 › @iconify/tools@5.0.14 › svgo@4.1.0 › css-select@6.0.0 › domutils@3.2.2
Overview
Affected versions of this package are vulnerable to Allocation of Resources Without Limits or Throttling via getFeed() in src/feeds.ts, when parsing RSS or Atom feeds containing nested item or entry elements. Because getFeed() collected item and entry elements at any depth below the feed root, an item nested inside another item was treated as an independent item, and its media elements were collected again for every enclosing item. This causes N nested items around M media:content elements to produce N × M media objects, exhausting the Node.js heap and terminating the process in a way that try/catch cannot prevent.
PoC
import { parseDocument } from "htmlparser2";
import { getFeed } from "domutils";
const n = 400;
const xml = "<rss><channel>" + "<item>".repeat(n) +
'<media:content url="x"/>'.repeat(n) + "</item>".repeat(n) +
"</channel></rss>";
const feed = getFeed(parseDocument(xml, { xmlMode: true }).children);
console.log(feed.items.reduce((sum, item) => sum + item.media.length, 0));
// 160000 with domutils 4.0.2 (15 KB of input)
Remediation
Upgrade domutils to version 4.1.0 or higher.
References
high severity
new
- Vulnerable module: domutils
- Introduced through: astro@7.4.14 and astro-icon@1.2.0
Detailed paths
-
Introduced through: @arthelokyo/astrowind@onwidget/astrowind › astro@7.4.14 › svgo@4.1.0 › css-select@6.0.0 › domutils@3.2.2
-
Introduced through: @arthelokyo/astrowind@onwidget/astrowind › astro-icon@1.2.0 › @iconify/tools@5.0.14 › svgo@4.1.0 › css-select@6.0.0 › domutils@3.2.2
Overview
Affected versions of this package are vulnerable to Inefficient Algorithmic Complexity via an inefficient algorithm in removeSubsets() that exhibits O(n² × depth) time complexity. When processing documents with many nested or sibling nodes, an attacker can submit HTML or XML input processed by css-select selectAll() or cheerio .find() to exhaust CPU and block the Node.js event loop for seconds.
PoC
import { parseDocument } from "htmlparser2";
import { getElementsByTagName, removeSubsets } from "domutils";
const doc = parseDocument("<b>".repeat(5_000) + "<i></i>".repeat(5_000));
const nodes = getElementsByTagName("i", doc);
console.time("removeSubsets");
removeSubsets(nodes); // about 15 s with domutils 4.0.2
console.timeEnd("removeSubsets");
Remediation
Upgrade domutils to version 4.1.0 or higher.
References
high severity
new
- Vulnerable module: fflate
- Introduced through: astro-icon@1.2.0
Detailed paths
-
Introduced through: @arthelokyo/astrowind@onwidget/astrowind › astro-icon@1.2.0 › @iconify/tools@5.0.14 › fflate@0.8.3
Overview
fflate is a High performance (de)compression in an 8kB package
Affected versions of this package are vulnerable to Unchecked Input for Loop Condition n the unzipSync and unzip functions. An attacker can block the JavaScript event loop for extended periods by submitting a ZIP archive whose ZIP64 end-of-central-directory record declares a large 32-bit entry count, which the parser uses directly to drive its central-directory iteration without validating it against the archive's actual size. A roughly 100-byte archive is sufficient to trigger tens of minutes of blocking, since each iteration still performs real work even when no corresponding entry data exists.
Remediation
There is no fixed version for fflate.
References
medium severity
new
- Vulnerable module: domutils
- Introduced through: astro@7.4.14 and astro-icon@1.2.0
Detailed paths
-
Introduced through: @arthelokyo/astrowind@onwidget/astrowind › astro@7.4.14 › svgo@4.1.0 › css-select@6.0.0 › domutils@3.2.2
-
Introduced through: @arthelokyo/astrowind@onwidget/astrowind › astro-icon@1.2.0 › @iconify/tools@5.0.14 › svgo@4.1.0 › css-select@6.0.0 › domutils@3.2.2
Overview
Affected versions of this package are vulnerable to Inefficient Algorithmic Complexity via find() and findAll() in src/querying.ts, which maintain stacks of child-node arrays using unshift() and shift() at the front of the array. Because these operations shift every existing entry on each call, traversing a deeply nested document takes time quadratic in its nesting depth. An attacker can supply a deeply nested HTML or XML document to any API built on these functions - including filter(), getElements(), getElementsByTagName(), getElementsByClassName(), and getElementsByTagType() - to block the Node.js event loop. A document of 100,000 nested <b> tags (approximately 300 KB) causes findAll() to run for about 2 seconds.
Workaround
Reject documents nested deeper than the application requires before searching them, or run the search in a worker thread that is terminated after a time limit.
PoC
import { parseDocument } from "htmlparser2";
import { findAll } from "domutils";
const doc = parseDocument("<b>".repeat(100_000));
console.time("findAll");
findAll(() => false, doc.children); // about 2 s with domutils 4.0.2
console.timeEnd("findAll");
Remediation
Upgrade domutils to version 4.1.0 or higher.
References
medium severity
new
- Vulnerable module: domutils
- Introduced through: astro@7.4.14 and astro-icon@1.2.0
Detailed paths
-
Introduced through: @arthelokyo/astrowind@onwidget/astrowind › astro@7.4.14 › svgo@4.1.0 › css-select@6.0.0 › domutils@3.2.2
-
Introduced through: @arthelokyo/astrowind@onwidget/astrowind › astro-icon@1.2.0 › @iconify/tools@5.0.14 › svgo@4.1.0 › css-select@6.0.0 › domutils@3.2.2
Overview
Affected versions of this package are vulnerable to Inefficient Algorithmic Complexity via compareDocumentPosition(), which builds each node's ancestor chain using unshift(), causing every existing entry in the chain to be shifted on each insertion and making the comparison take time quadratic in the nesting depth of the nodes. An attacker can supply an HTML or XML document with deeply nested elements and trigger a comparison or sort via uniqueSort() to block the Node.js event loop.
Workaround
Reject documents nested deeper than the application requires before comparing or sorting their nodes.
PoC
import { parseDocument } from "htmlparser2";
import { compareDocumentPosition } from "domutils";
let parent = parseDocument("<b>".repeat(100_000) + "<i></i><u></u>");
while (parent.children.length === 1) parent = parent.children[0];
console.time("compare");
compareDocumentPosition(parent.children[0], parent.children[1]); // about 1 s with domutils 4.0.2
console.timeEnd("compare");
Note: The PoC states it takes about 1 second with domutils 4.0.2 on Node.js.
Remediation
Upgrade domutils to version 4.1.0 or higher.
References
medium severity
new
- Vulnerable module: domutils
- Introduced through: astro@7.4.14 and astro-icon@1.2.0
Detailed paths
-
Introduced through: @arthelokyo/astrowind@onwidget/astrowind › astro@7.4.14 › svgo@4.1.0 › css-select@6.0.0 › domutils@3.2.2
-
Introduced through: @arthelokyo/astrowind@onwidget/astrowind › astro-icon@1.2.0 › @iconify/tools@5.0.14 › svgo@4.1.0 › css-select@6.0.0 › domutils@3.2.2
Overview
Affected versions of this package are vulnerable to Uncontrolled Recursion via getText(), textContent(), and innerText() in src/stringify.ts, which call themselves once per level of nesting. An attacker can supply an HTML or XML document with approximately 10,000 nested elements to exhaust the JavaScript call stack, triggering a RangeError that fails the request or terminates the Node.js process.
PoC
import { parseDocument } from "htmlparser2";
import { getText } from "domutils";
getText(parseDocument("<b>".repeat(10_000) + "x").children);
// RangeError: Maximum call stack size exceeded
Remediation
Upgrade domutils to version 4.1.0 or higher.
References
medium severity
new
- Vulnerable module: domutils
- Introduced through: astro@7.4.14 and astro-icon@1.2.0
Detailed paths
-
Introduced through: @arthelokyo/astrowind@onwidget/astrowind › astro@7.4.14 › svgo@4.1.0 › css-select@6.0.0 › domutils@3.2.2
-
Introduced through: @arthelokyo/astrowind@onwidget/astrowind › astro-icon@1.2.0 › @iconify/tools@5.0.14 › svgo@4.1.0 › css-select@6.0.0 › domutils@3.2.2
Overview
Affected versions of this package are vulnerable to Uncontrolled Recursion via findOne(), existsOne(), and getElementById(), which recurse once per level of nesting in a document. An attacker can supply HTML or XML with approximately 20,000 nested elements to exhaust the JavaScript call stack, causing a RangeError that results in request failures or process termination.
PoC
import { parseDocument } from "htmlparser2";
import { findOne } from "domutils";
findOne(() => false, parseDocument("<b>".repeat(20_000)).children);
// RangeError: Maximum call stack size exceeded
Remediation
Upgrade domutils to version 4.1.0 or higher.
References
medium severity
new
- Vulnerable module: picomatch
- Introduced through: astro@7.4.14
Detailed paths
-
Introduced through: @arthelokyo/astrowind@onwidget/astrowind › astro@7.4.14 › picomatch@4.0.7
-
Introduced through: @arthelokyo/astrowind@onwidget/astrowind › astro@7.4.14 › @astrojs/internal-helpers@0.13.3 › picomatch@4.0.7
-
Introduced through: @arthelokyo/astrowind@onwidget/astrowind › astro@7.4.14 › tinyglobby@0.2.17 › picomatch@4.0.7
-
Introduced through: @arthelokyo/astrowind@onwidget/astrowind › astro@7.4.14 › vite@8.4.1 › picomatch@4.0.7
-
Introduced through: @arthelokyo/astrowind@onwidget/astrowind › astro@7.4.14 › @astrojs/markdown-satteri@0.4.10 › @astrojs/internal-helpers@0.13.3 › picomatch@4.0.7
-
Introduced through: @arthelokyo/astrowind@onwidget/astrowind › astro@7.4.14 › @astrojs/vite-plugin-astro@0.1.4 › @astrojs/internal-helpers@0.13.3 › picomatch@4.0.7
-
Introduced through: @arthelokyo/astrowind@onwidget/astrowind › astro@7.4.14 › vite@8.4.1 › tinyglobby@0.2.17 › picomatch@4.0.7
-
Introduced through: @arthelokyo/astrowind@onwidget/astrowind › astro@7.4.14 › unstorage@1.17.6 › anymatch@3.1.3 › picomatch@2.3.2
Overview
Affected versions of this package are vulnerable to Incorrect Regular Expression via the globstar function in lib/parse.js, where globstar (**) patterns are compiled without the dotAll flag, causing the generated regular expression to use . which does not match line terminator characters. An attacker who controls file names, object keys, or archive entry names can embed newline characters in those names to evade **-based deny patterns, causing excluded resources to be included and exposed.
Remediation
A fix was pushed into the master branch but not yet published.
References
medium severity
- Module: lightningcss
- Introduced through: astro@7.4.14
Detailed paths
-
Introduced through: @arthelokyo/astrowind@onwidget/astrowind › astro@7.4.14 › vite@8.4.1 › lightningcss@1.33.0
MPL-2.0 license