CWE-407
Weakness Allowed-with-ReviewInefficient Algorithmic Complexity
Abstraction: Class · Status: Incomplete
An algorithm in a product has an inefficient worst-case computational complexity that may be detrimental to system performance and can be triggered by an attacker, typically using crafted manipulations that ensure that the worst case is being reached.
Mapping guidance
This CWE entry is a Class and might have Base-level children that would be more appropriate
Examine children of this entry to see if there is a better fit
Modes of introduction
Detection methods
Automated Static Analysis
Automated static analysis, commonly referred to as Static Application Security Testing (SAST), can find some instances of this weakness by analyzing source code (or binary/compiled code) without having to execute it. Typically, this is done by building a model of data flow and control flow, then searching for potentially-vulnerable patterns that connect "sources" (origins of input) with "sinks" (destinations where the data interacts with external components, a lower layer such as the OS, etc.)
Effectiveness: High
Content history
updated Time_of_Introduction
updated Common_Consequences, Relationships, Other_Notes, Taxonomy_Mappings
updated Functional_Areas, Other_Notes
updated Common_Consequences
updated Applicable_Platforms, Likelihood_of_Exploit
updated Common_Consequences
updated Observed_Examples, Relationships
updated Relationships
updated Relationships
updated Likelihood_of_Exploit
updated Name, Relationships, Type
updated Relationships
updated Relationships
updated References, Relationships
updated References
updated Alternate_Terms, Observed_Examples, Relationships
updated Demonstrative_Examples, Observed_Examples, References
updated Relationships
updated Mapping_Notes
updated Weakness_Ordinalities
updated Detection_Factors, References
704 vulnerabilities reference this CWE, most recent first.
GHSA-4G9H-PV2V-FW83
Vulnerability from github – Published: 2026-10-29 15:30 – Updated: 2026-10-29 15:30Python-Markdown 3.0 through 3.11.2 contains an algorithmic complexity vulnerability in inline link parsing that allows remote attackers to exhaust CPU through unmatched brackets. Attackers can submit short Markdown containing repeated [ or ![ characters, forcing LinkInlineProcessor.getText() and getLink() into quadratic scans that keep workers busy for minutes.
{
"affected": [],
"aliases": [
"CVE-2019-25781"
],
"database_specific": {
"cwe_ids": [
"CWE-407"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2026-10-29T14:17:39Z",
"severity": "HIGH"
},
"details": "Python-Markdown 3.0 through 3.11.2 contains an algorithmic complexity vulnerability in inline link parsing that allows remote attackers to exhaust CPU through unmatched brackets. Attackers can submit short Markdown containing repeated [ or ![ characters, forcing LinkInlineProcessor.getText() and getLink() into quadratic scans that keep workers busy for minutes.",
"id": "GHSA-4g9h-pv2v-fw83",
"modified": "2026-10-29T15:30:51Z",
"published": "2026-10-29T15:30:51Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2019-25781"
},
{
"type": "WEB",
"url": "https://github.com/Python-Markdown/markdown/issues/1654"
},
{
"type": "WEB",
"url": "https://github.com/Python-Markdown/markdown/issues/798"
},
{
"type": "WEB",
"url": "https://github.com/Python-Markdown/markdown"
},
{
"type": "WEB",
"url": "https://github.com/Python-Markdown/markdown/blob/b41e0aaf1181f1a8cb200cf5a815aad7c0020d23/markdown/inlinepatterns.py#L1155-L1172"
},
{
"type": "WEB",
"url": "https://www.vulncheck.com/advisories/python-markdown-3.0-through-3.11.2-denial-of-service-via-link-bracket-parsing"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H",
"type": "CVSS_V3"
},
{
"score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X",
"type": "CVSS_V4"
}
]
}
GHSA-4HX4-Q2MP-7H24
Vulnerability from github – Published: 2026-10-28 18:32 – Updated: 2026-11-05 21:34MIME::Parser versions before 5.521 for Perl allow memory exhaustion via indented error messages from a truncated, deeply nested message.
Each stored parser diagnostic is indented by three spaces per nesting level. When a message nested N levels deep ends without its closing boundaries, every level logs an error at its own depth, so the stored diagnostics grow with the square of N. The defaults place no limit on nesting depth.
{
"affected": [],
"aliases": [
"CVE-2026-116267"
],
"database_specific": {
"cwe_ids": [
"CWE-407"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2026-10-28T18:17:13Z",
"severity": "HIGH"
},
"details": "MIME::Parser versions before 5.521 for Perl allow memory exhaustion via indented error messages from a truncated, deeply nested message.\n\nEach stored parser diagnostic is indented by three spaces per nesting level. When a message nested N levels deep ends without its closing boundaries, every level logs an error at its own depth, so the stored diagnostics grow with the square of N. The defaults place no limit on nesting depth.",
"id": "GHSA-4hx4-q2mp-7h24",
"modified": "2026-11-05T21:34:41Z",
"published": "2026-10-28T18:32:12Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-116267"
},
{
"type": "WEB",
"url": "https://metacpan.org/release/DSKOLL/MIME-tools-5.521/changes"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-4J32-57V6-6G45
Vulnerability from github – Published: 2026-07-20 21:32 – Updated: 2026-07-20 21:32Summary
Type: Algorithmic-complexity DoS in core emphasis parsing. A long sequence of well-formed **x** (strong) or ***x*** (strong-emphasis combined) pairs causes O(N²) parser work. Distinct from the bracket-bomb DoS ([ repetition) and from the formatting-plugin DoS (~~/==/^^); this one fires on default-config mistune with no plugins required.
File: src/mistune/inline_parser.py lines 41-48 (the EMPHASIS_END_RE family) and the surrounding emphasis dispatch.
Root cause: for every opening run of *s the parser scans forward using one of EMPHASIS_END_RE['*'] / ['**'] / ['***'] to find the matching close. Each scan is bounded per call, but the parser invokes the scan from every potential start position. For input shaped **x** repeated N times, every ** is treated as a potential start, each scan can cover up to the end of input. Total work is O(N²). The triple-emphasis variant ***x*** is slightly worse due to the extra alternation between *, **, and *** close patterns. Reproducible against default mistune with no plugins.
Affected Code
File: src/mistune/inline_parser.py, lines 41-48.
EMPHASIS_END_RE = {
"*": re.compile(r"(?:" + PREVENT_BACKSLASH + r"\\\*|[^\s*])\*(?!\*)"),
"_": re.compile(r"(?:" + PREVENT_BACKSLASH + r"\\_|[^\s_])_(?!_)\b"),
"**": re.compile(r"(?:" + PREVENT_BACKSLASH + r"\\\*|[^\s*])\*\*(?!\*)"),
"__": re.compile(r"(?:" + PREVENT_BACKSLASH + r"\\_|[^\s_])__(?!_)\b"),
"***": re.compile(r"(?:" + PREVENT_BACKSLASH + r"\\\*|[^\s*])\*\*\*(?!\*)"),
"___": re.compile(r"(?:" + PREVENT_BACKSLASH + r"\\_|[^\s_])___(?!_)\b"),
}
# Each of the six end-patterns is invoked from every emphasis open position
# fired by the inline rule `r"\*{1,3}(?=[^\s*])|\b_{1,3}(?=[^\s_])"`. The
# scan itself is bounded per call; the cost comes from the parser invoking
# the scan at every matching open marker, giving O(N²) total work.
Why it's wrong: same shape as the formatting-plugin and bracket-bomb DoS findings. The CommonMark reference parser handles emphasis in linear time using a delimiter-stack algorithm (commonmark.js, commonmark-py, markdown-it-py all do this). mistune retries the close-scan from each open marker. The bounded regex is not enough; the surrounding loop is the source of the quadratic.
Exploit Chain
- Application uses mistune to render user-supplied markdown. No plugins required — affects the default
mistune.create_markdown()configuration. - Attacker submits a 40 KB payload of
**x**repeated 8000 times. - Server CPU pegs for ~4 seconds; 16 KB → ~17 seconds. Doubling input quadruples time.
- Repeating the request floods the worker pool.
Security Impact
Severity: sec-high. Network-reachable, no authentication, no plugin requirement. Default mistune is vulnerable.
Attacker capability: O(N²) CPU cost from a single small input. Predictable scaling, easy to combine with concurrent requests for service denial.
Preconditions: application uses mistune.create_markdown() (default config) on attacker-supplied markdown. No plugins required.
Differential: PoC-verified against mistune@3.2.1, default config:
import mistune, time
md = mistune.create_markdown() # no plugins
for n in [500, 1000, 2000, 4000, 8000]:
s = '**x**' * n
t = time.time()
md(s)
print(f' **x** * {n} ({len(s)}b): {(time.time() - t) * 1000:.0f}ms')
# Output (Python 3.13, Linux, 2.5GHz CPU):
# **x** * 500 (2500b): 20ms
# **x** * 1000 (5000b): 74ms
# **x** * 2000 (10000b): 284ms
# **x** * 4000 (20000b): 1079ms
# **x** * 8000 (40000b): 4309ms
# Triple-emphasis is similar:
md('***x***' * 4000) # ~1500ms
# Linear in N for non-emphasis input of comparable size:
md('xxxxx' * 8000) # 1ms (4000x faster)
The patched build (with the suggested fix below — delimiter-stack rewrite or hard cap on simultaneous open markers) keeps the time linear in N.
Suggested Fix
Cap the number of unmatched opening emphasis markers the parser will track simultaneously, treating the rest as literal text:
--- a/src/mistune/inline_parser.py
+++ b/src/mistune/inline_parser.py
@@ ... in the emphasis-handling code path
+ # Bound the number of open emphasis markers tracked. CommonMark gives
+ # no semantics to deeply nested unmatched emphasis; this cap turns the
+ # parser-level O(N^2) into O(N) for adversarial inputs while preserving
+ # behaviour on every realistic markdown document.
+ MAX_OPEN_EMPHASIS = 100
+ if open_emphasis_count > MAX_OPEN_EMPHASIS:
+ # treat remaining * / _ as literal text
+ ...
The proper fix is a delimiter-stack pass, the same approach the formatting-plugin advisory and the bracket-bomb advisory recommend. All three DoS findings share the same algorithmic pattern; a single rewrite of the inline-token retry loop closes them together. Add a regression test asserting that md('**x**' * 50_000) completes in under 1 second.
{
"affected": [
{
"package": {
"ecosystem": "PyPI",
"name": "mistune"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "3.3.0"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2026-59925"
],
"database_specific": {
"cwe_ids": [
"CWE-1333",
"CWE-407"
],
"github_reviewed": true,
"github_reviewed_at": "2026-07-20T21:32:40Z",
"nvd_published_at": "2026-07-08T17:17:28Z",
"severity": "HIGH"
},
"details": "## Summary\n\n**Type:** Algorithmic-complexity DoS in core emphasis parsing. A long sequence of well-formed `**x**` (strong) or `***x***` (strong-emphasis combined) pairs causes O(N\u00b2) parser work. Distinct from the bracket-bomb DoS (`[` repetition) and from the formatting-plugin DoS (`~~`/`==`/`^^`); this one fires on default-config mistune with no plugins required.\n**File:** `src/mistune/inline_parser.py` lines 41-48 (the `EMPHASIS_END_RE` family) and the surrounding emphasis dispatch.\n**Root cause:** for every opening run of `*`s the parser scans forward using one of `EMPHASIS_END_RE[\u0027*\u0027]` / `[\u0027**\u0027]` / `[\u0027***\u0027]` to find the matching close. Each scan is bounded per call, but the parser invokes the scan from every potential start position. For input shaped `**x**` repeated N times, every `**` is treated as a potential start, each scan can cover up to the end of input. Total work is O(N\u00b2). The triple-emphasis variant `***x***` is slightly worse due to the extra alternation between `*`, `**`, and `***` close patterns. Reproducible against default mistune with no plugins.\n\n## Affected Code\n\n**File:** `src/mistune/inline_parser.py`, lines 41-48.\n\n```python\nEMPHASIS_END_RE = {\n \"*\": re.compile(r\"(?:\" + PREVENT_BACKSLASH + r\"\\\\\\*|[^\\s*])\\*(?!\\*)\"),\n \"_\": re.compile(r\"(?:\" + PREVENT_BACKSLASH + r\"\\\\_|[^\\s_])_(?!_)\\b\"),\n \"**\": re.compile(r\"(?:\" + PREVENT_BACKSLASH + r\"\\\\\\*|[^\\s*])\\*\\*(?!\\*)\"),\n \"__\": re.compile(r\"(?:\" + PREVENT_BACKSLASH + r\"\\\\_|[^\\s_])__(?!_)\\b\"),\n \"***\": re.compile(r\"(?:\" + PREVENT_BACKSLASH + r\"\\\\\\*|[^\\s*])\\*\\*\\*(?!\\*)\"),\n \"___\": re.compile(r\"(?:\" + PREVENT_BACKSLASH + r\"\\\\_|[^\\s_])___(?!_)\\b\"),\n}\n# Each of the six end-patterns is invoked from every emphasis open position\n# fired by the inline rule `r\"\\*{1,3}(?=[^\\s*])|\\b_{1,3}(?=[^\\s_])\"`. The\n# scan itself is bounded per call; the cost comes from the parser invoking\n# the scan at every matching open marker, giving O(N\u00b2) total work.\n```\n\n**Why it\u0027s wrong:** same shape as the formatting-plugin and bracket-bomb DoS findings. The CommonMark reference parser handles emphasis in linear time using a delimiter-stack algorithm (`commonmark.js`, `commonmark-py`, `markdown-it-py` all do this). mistune retries the close-scan from each open marker. The bounded regex is not enough; the surrounding loop is the source of the quadratic.\n\n## Exploit Chain\n\n1. Application uses mistune to render user-supplied markdown. No plugins required \u2014 affects the default `mistune.create_markdown()` configuration.\n2. Attacker submits a 40 KB payload of `**x**` repeated 8000 times.\n3. Server CPU pegs for ~4 seconds; 16 KB \u2192 ~17 seconds. Doubling input quadruples time.\n4. Repeating the request floods the worker pool.\n\n## Security Impact\n\n**Severity:** sec-high. Network-reachable, no authentication, no plugin requirement. Default mistune is vulnerable.\n**Attacker capability:** O(N\u00b2) CPU cost from a single small input. Predictable scaling, easy to combine with concurrent requests for service denial.\n**Preconditions:** application uses `mistune.create_markdown()` (default config) on attacker-supplied markdown. No plugins required.\n**Differential:** PoC-verified against mistune@3.2.1, default config:\n\n```python\nimport mistune, time\nmd = mistune.create_markdown() # no plugins\nfor n in [500, 1000, 2000, 4000, 8000]:\n s = \u0027**x**\u0027 * n\n t = time.time()\n md(s)\n print(f\u0027 **x** * {n} ({len(s)}b): {(time.time() - t) * 1000:.0f}ms\u0027)\n\n# Output (Python 3.13, Linux, 2.5GHz CPU):\n# **x** * 500 (2500b): 20ms\n# **x** * 1000 (5000b): 74ms\n# **x** * 2000 (10000b): 284ms\n# **x** * 4000 (20000b): 1079ms\n# **x** * 8000 (40000b): 4309ms\n\n# Triple-emphasis is similar:\nmd(\u0027***x***\u0027 * 4000) # ~1500ms\n\n# Linear in N for non-emphasis input of comparable size:\nmd(\u0027xxxxx\u0027 * 8000) # 1ms (4000x faster)\n```\n\nThe patched build (with the suggested fix below \u2014 delimiter-stack rewrite or hard cap on simultaneous open markers) keeps the time linear in N.\n\n## Suggested Fix\n\nCap the number of unmatched opening emphasis markers the parser will track simultaneously, treating the rest as literal text:\n\n```diff\n--- a/src/mistune/inline_parser.py\n+++ b/src/mistune/inline_parser.py\n@@ ... in the emphasis-handling code path\n+ # Bound the number of open emphasis markers tracked. CommonMark gives\n+ # no semantics to deeply nested unmatched emphasis; this cap turns the\n+ # parser-level O(N^2) into O(N) for adversarial inputs while preserving\n+ # behaviour on every realistic markdown document.\n+ MAX_OPEN_EMPHASIS = 100\n+ if open_emphasis_count \u003e MAX_OPEN_EMPHASIS:\n+ # treat remaining * / _ as literal text\n+ ...\n```\n\nThe proper fix is a delimiter-stack pass, the same approach the formatting-plugin advisory and the bracket-bomb advisory recommend. All three DoS findings share the same algorithmic pattern; a single rewrite of the inline-token retry loop closes them together. Add a regression test asserting that `md(\u0027**x**\u0027 * 50_000)` completes in under 1 second.",
"id": "GHSA-4j32-57v6-6g45",
"modified": "2026-07-20T21:32:40Z",
"published": "2026-07-20T21:32:40Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/lepture/mistune/security/advisories/GHSA-4j32-57v6-6g45"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-59925"
},
{
"type": "WEB",
"url": "https://github.com/lepture/mistune/commit/5de41fb8e527004dbc363e047a3c380c9288c74f"
},
{
"type": "PACKAGE",
"url": "https://github.com/lepture/mistune"
},
{
"type": "WEB",
"url": "https://github.com/lepture/mistune/releases/tag/v3.3.0"
},
{
"type": "WEB",
"url": "https://github.com/pypa/advisory-database/tree/main/vulns/mistune/PYSEC-2026-2213.yaml"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H",
"type": "CVSS_V3"
}
],
"summary": "Mistune inline_parser: quadratic-time parsing on long runs of `**x**` and `***x***` emphasis pairs"
}
GHSA-4J63-6C4X-WFG4
Vulnerability from github – Published: 2026-11-13 00:45 – Updated: 2026-11-13 00:45Summary
Matching a selector that puts a general-sibling combinator inside :has(), such as div:has(a ~ b), against untrusted HTML runs in O(n²) time in the number of sibling elements. A single small document with a few thousand siblings ties the process up for a minute of CPU, so an application that runs a fixed selector of this shape over HTML it doesn't control can be stalled by one request.
:has is powerful, but much in the same way poor regular expressions can be crafted to cause catastrophic backtracking with greedy capturing, has can be used to create non-ideal scenarios that can cause large portions of the tree to be evaluated for one or many elements if not used thoughtfully.
This behavior is not exclusive to Soup Sieve, but browsers make note of these potential performance issues themselves: https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Selectors/:has#performance_considerations.
With all of that said, there is room for improvements that can in some cases greatly improve performance.
Details
:has(a ~ b) asks "does this element contain an a that has a later sibling b?". When no b is present, soupsieve can't short-circuit, and it answers the question with a nested scan: match_future_child walks every candidate a under the scope, and for each one the general-sibling branch of match_future_relations walks all of that a's following siblings looking for b. With n siblings that is (n-1) + (n-2) + ... + 1 comparisons, i.e. O(n²).
The adjacent-sibling form div:has(a + b) stays linear, because its branch checks only the one immediately following sibling per candidate. So the cost is specific to the general-sibling ~ (and ~ nested inside :has), and it shows up on the common case where the right-hand side simply isn't there.
Proof of concept
Installed from PyPI: pip install soupsieve==2.9.2 beautifulsoup4.
import time
import soupsieve
from bs4 import BeautifulSoup
selector = "div:has(a ~ b)"
for n in (1000, 2000, 4000, 8000):
html = "<div>" + ("<a></a>" * n) + "</div>"
soup = BeautifulSoup(html, "html.parser")
start = time.perf_counter()
soupsieve.select(selector, soup)
print(n, round((time.perf_counter() - start) * 1000), "ms")
Measured:
n=1000 837 ms
n=2000 3667 ms
n=4000 14797 ms
n=8000 59746 ms
Time quadruples for each doubling of n. The n=8000 input is a ~56 KB HTML fragment.
Impact
Availability. Any caller that evaluates a fixed selector containing a general sibling under :has() over attacker-controlled markup can be forced to spend minutes of CPU on a small input. The selector is developer-authored and ordinary; the untrusted part is the HTML, which is soupsieve's normal input.
A single-pass evaluation of the sibling run (remember whether an a has been seen while scanning the siblings once) would make this case linear.
Mitigation
Quadratic time for :has in some circumstances is expected and not a bug. While we've made optimizations and there may be more in the future, the way :has is designed to operate will never perform in linear time in all circumstances. Users should thoughtfully apply the use of :has.
The anchor selector (the A in A:has(B)) should not be an element that has too many children. Additionally, too general an anchor, such as *, can cause :has() to be applied to every element.
Further, it is recommended that the inner selector (the B in A:has(B)) should use combinators like > or + to limit traversal. When the selector inside :has() is not tightly constrained, Soup Sieve might need to traverse the entire subtree of the anchor
element to check the condition.
If the risk for a given project is too great, user input can be scanned for usage of :has and be denied. Calls can also be wrapped in a timeout to prevent long-running processes as well.
{
"affected": [
{
"database_specific": {
"last_known_affected_version_range": "\u003c= 2.9.2"
},
"package": {
"ecosystem": "PyPI",
"name": "soupsieve"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "2.10.0"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2026-126192"
],
"database_specific": {
"cwe_ids": [
"CWE-400",
"CWE-407"
],
"github_reviewed": true,
"github_reviewed_at": "2026-11-13T00:45:18Z",
"nvd_published_at": "2026-11-12T17:17:32Z",
"severity": "MODERATE"
},
"details": "## Summary\n\nMatching a selector that puts a general-sibling combinator inside `:has()`, such as `div:has(a ~ b)`, against untrusted HTML runs in O(n\u00b2) time in the number of sibling elements. A single small document with a few thousand siblings ties the process up for a minute of CPU, so an application that runs a fixed selector of this shape over HTML it doesn\u0027t control can be stalled by one request.\n\n`:has` is powerful, but much in the same way poor regular expressions can be crafted to cause catastrophic backtracking with greedy capturing, has can be used to create non-ideal scenarios that can cause large portions of the tree to be evaluated for one or many elements if not used thoughtfully.\n\nThis behavior is not exclusive to Soup Sieve, but browsers make note of these potential performance issues themselves: https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Selectors/:has#performance_considerations.\n\nWith all of that said, there is room for improvements that can in some cases greatly improve performance.\n\n## Details\n\n`:has(a ~ b)` asks \"does this element contain an `a` that has a later sibling `b`?\". When no `b` is present, soupsieve can\u0027t short-circuit, and it answers the question with a nested scan: `match_future_child` walks every candidate `a` under the scope, and for each one the general-sibling branch of `match_future_relations` walks all of that `a`\u0027s following siblings looking for `b`. With n siblings that is (n-1) + (n-2) + ... + 1 comparisons, i.e. O(n\u00b2).\n\nThe adjacent-sibling form `div:has(a + b)` stays linear, because its branch checks only the one immediately following sibling per candidate. So the cost is specific to the general-sibling `~` (and `~` nested inside `:has`), and it shows up on the common case where the right-hand side simply isn\u0027t there.\n\n## Proof of concept\n\nInstalled from PyPI: `pip install soupsieve==2.9.2 beautifulsoup4`.\n\n```python\nimport time\nimport soupsieve\nfrom bs4 import BeautifulSoup\n\nselector = \"div:has(a ~ b)\"\n\nfor n in (1000, 2000, 4000, 8000):\n html = \"\u003cdiv\u003e\" + (\"\u003ca\u003e\u003c/a\u003e\" * n) + \"\u003c/div\u003e\"\n soup = BeautifulSoup(html, \"html.parser\")\n start = time.perf_counter()\n soupsieve.select(selector, soup)\n print(n, round((time.perf_counter() - start) * 1000), \"ms\")\n```\n\nMeasured:\n\n```\nn=1000 837 ms\nn=2000 3667 ms\nn=4000 14797 ms\nn=8000 59746 ms\n```\n\nTime quadruples for each doubling of n. The n=8000 input is a ~56 KB HTML fragment.\n\n## Impact\n\nAvailability. Any caller that evaluates a fixed selector containing a general sibling under `:has()` over attacker-controlled markup can be forced to spend minutes of CPU on a small input. The selector is developer-authored and ordinary; the untrusted part is the HTML, which is soupsieve\u0027s normal input.\n\nA single-pass evaluation of the sibling run (remember whether an `a` has been seen while scanning the siblings once) would make this case linear.\n\n## Mitigation\n\nQuadratic time for `:has` in some circumstances is expected and not a bug. While we\u0027ve made optimizations and there may be more in the future, the way `:has` is designed to operate will never perform in linear time in all circumstances. Users should thoughtfully apply the use of `:has`.\n\nThe anchor selector (the `A` in `A:has(B)`) should not be an element that has too many children. Additionally, too general an anchor, such as `*`, can cause `:has()` to be applied to every element.\n\nFurther, it is recommended that the inner selector (the `B` in `A:has(B)`) should use combinators like `\u003e` or `+` to limit traversal. When the selector inside `:has()` is not tightly constrained, Soup Sieve might need to traverse the entire subtree of the anchor\nelement to check the condition.\n\nIf the risk for a given project is too great, user input can be scanned for usage of `:has` and be denied. Calls can also be wrapped in a timeout to prevent long-running processes as well.",
"id": "GHSA-4j63-6c4x-wfg4",
"modified": "2026-11-13T00:45:18Z",
"published": "2026-11-13T00:45:18Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/facelessuser/soupsieve/security/advisories/GHSA-4j63-6c4x-wfg4"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-126192"
},
{
"type": "WEB",
"url": "https://github.com/facelessuser/soupsieve/pull/304"
},
{
"type": "WEB",
"url": "https://github.com/facelessuser/soupsieve/commit/ffb88cca745c591224f74a8e86414a85e8f35fc0"
},
{
"type": "PACKAGE",
"url": "https://github.com/facelessuser/soupsieve"
},
{
"type": "WEB",
"url": "https://github.com/facelessuser/soupsieve/releases/tag/2.10"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N",
"type": "CVSS_V4"
}
],
"summary": "Soup Sieve: General sibling combinator inside :has() matches untrusted HTML in quadratic time"
}
GHSA-4MWX-9CGQ-H2WP
Vulnerability from github – Published: 2026-08-03 03:31 – Updated: 2026-09-02 15:34In Bouncy Castle for Java before 1.85, Quadratic-time escaping when stringifying X.500 distinguished names. This issue also affects Bouncy Castle for Java LTS before 2.73.12, and Bouncy Castle for Java FIPS (BC-FJA) before bc-fips 1.0.2.7 (1.0.X series), 2.0.2 (2.0.X series) and 2.1.3 (2.1.X series).
{
"affected": [],
"aliases": [
"CVE-2026-58059"
],
"database_specific": {
"cwe_ids": [
"CWE-407"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2026-08-03T03:16:45Z",
"severity": "HIGH"
},
"details": "In Bouncy Castle for Java before 1.85, Quadratic-time escaping when stringifying X.500 distinguished names. This issue also affects Bouncy Castle for Java LTS before 2.73.12, and Bouncy Castle for Java FIPS (BC-FJA) before bc-fips 1.0.2.7 (1.0.X series), 2.0.2 (2.0.X series) and 2.1.3 (2.1.X series).",
"id": "GHSA-4mwx-9cgq-h2wp",
"modified": "2026-09-02T15:34:22Z",
"published": "2026-08-03T03:31:57Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-58059"
},
{
"type": "WEB",
"url": "https://github.com/bcgit/bc-java/commit/7bf20eea8c1b71a4d3574b75ba20ccf26ffff36b"
},
{
"type": "WEB",
"url": "https://github.com/bcgit/bc-java/wiki/CVE%E2%80%902026%E2%80%9058059"
},
{
"type": "WEB",
"url": "https://github.com/bcgit/bc-java/wiki/CVE-2026-58059"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H",
"type": "CVSS_V3"
},
{
"score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:Amber",
"type": "CVSS_V4"
}
]
}
GHSA-4P8Q-H859-JH8M
Vulnerability from github – Published: 2026-12-04 12:31 – Updated: 2026-12-04 12:31httpx2 reassembled fragmented WebSocket messages by appending each continuation frame to a bytes buffer, copying the whole accumulated message on every frame. A WebSocket server, or an on-path attacker on an unencrypted ws:// connection, can split messages into many tiny continuation frames so that reassembly takes time quadratic in the number of frames. Reassembly holds the GIL in the synchronous client and blocks the event loop in the asynchronous client.
Applications are affected when they open a WebSocket session with client.websocket() or httpx2.websocket() to an untrusted endpoint, using httpx2 from 2.6.0 up to (but excluding) 2.18.0. From 2.10.0, the default max_message_size_bytes limit of 64 KiB bounds the work per message, so sustained load needs many messages; versions 2.6.0 to 2.9.1 have no such limit.
The issue is fixed in 2.18.0, which collects fragments in a list and joins them once when the final frame arrives. Until then, keep max_message_size_bytes small and connect only to trusted wss:// endpoints.
{
"affected": [],
"aliases": [
"CVE-2026-132651"
],
"database_specific": {
"cwe_ids": [
"CWE-407"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2026-12-04T12:18:32Z",
"severity": "MODERATE"
},
"details": "httpx2 reassembled fragmented WebSocket messages by appending each continuation frame to a bytes buffer, copying the whole accumulated message on every frame. A WebSocket server, or an on-path attacker on an unencrypted ws:// connection, can split messages into many tiny continuation frames so that reassembly takes time quadratic in the number of frames. Reassembly holds the GIL in the synchronous client and blocks the event loop in the asynchronous client.\n\nApplications are affected when they open a WebSocket session with client.websocket() or httpx2.websocket() to an untrusted endpoint, using httpx2 from 2.6.0 up to (but excluding) 2.18.0. From 2.10.0, the default max_message_size_bytes limit of 64 KiB bounds the work per message, so sustained load needs many messages; versions 2.6.0 to 2.9.1 have no such limit.\n\nThe issue is fixed in 2.18.0, which collects fragments in a list and joins them once when the final frame arrives. Until then, keep max_message_size_bytes small and connect only to trusted wss:// endpoints.",
"id": "GHSA-4p8q-h859-jh8m",
"modified": "2026-12-04T12:31:17Z",
"published": "2026-12-04T12:31:17Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/pydantic/httpx2/security/advisories/GHSA-3w8q-h8jv-vvhw"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-132651"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L",
"type": "CVSS_V3"
}
]
}
GHSA-4QX8-W7C3-PJ3P
Vulnerability from github – Published: 2026-10-22 16:38 – Updated: 2026-10-22 16:38Summary
toml.parse() is vulnerable to a quadratic-complexity (O(n²)) denial-of-service via many
array-of-tables ([[name]]) headers. addTableArray() in lib/compiler.js rescans two
entire bookkeeping Sets on every [[name]] header without pruning unrelated or distinct
entries, so a document containing n such headers costs O(n²) compiler work. A ~321KB document
of 20,000 distinct-named [[name]] blocks takes ~10.3 seconds to parse — a completely
ordinary-looking TOML shape (a flat settings block plus one or more array-of-tables sections),
not a contrived edge case. This is a separate, unpatched code path from the previously fixed
stack-overflow DoS (GHSA-82x6-q7mm-w9cf) and requires no key nesting or dotted keys at all.
Affected component / version
- Package:
toml(npm), repositoryBinaryMuse/toml-node - Function:
addTableArray()inlib/compiler.js - Confirmed present in the audited checkout at commit
1b2ac40(2026-07-16), one commit past thev5.0.0tag (a changelog-only change) — i.e. present inv5.0.0, the latest release. Not exhaustively verified against every prior release, but the affected function is unrelated tov5.0.0's BigInt/Temporal changes (perCHANGELOG.md), so the defect likely predates that release as well.
Details
toml.parse(input, options) (index.js:5-9) forwards the caller-supplied string to
parser.parse() and then compiler.compile() with no length or structural validation. Every
[[name]] (array-of-tables) header is routed (reduce(), lib/compiler.js:43) to
addTableArray() (lib/compiler.js:218-245), which performs two full linear scans on every
call:
assignedPaths.forEach(function(p) {
if (isSameOrSubPath(p, quotedPath)) assignedPaths.delete(p);
});
valueAssignments.forEach(function(p) {
if (isSameOrSubPath(p, quotedPath)) valueAssignments.delete(p);
});
(lib/compiler.js:228-233)
assignedPaths and valueAssignments accumulate one entry per top-level key/table/array path
ever assigned in the entire document. Each scan prunes only entries matching the currently
reopened path via isSameOrSubPath() (lib/compiler.js:319-321: path === prefix ||
path.indexOf(prefix + ".") === 0); anything else — an unrelated top-level key, or simply a
different array-of-tables name — is never removed and is rescanned in full on every
subsequent [[name]] header for the rest of the parse. Set.prototype.forEach has no early
exit, so this is unconditionally O(current Set size) on every call, giving O(n²) total work
for n such headers.
Proof of Concept
The sharpest reproduction needs no unrelated keys at all — just N array-of-tables headers with N distinct names, since nothing is ever pruned when no name repeats:
const toml = require('toml');
function distinctArrayHeaders(n) {
let out = '';
for (let i = 0; i < n; i++) out += `[[a${i}]]\nv = 1\n`;
return out;
}
// ~321 KB input -- takes ~10.3 seconds
toml.parse(distinctArrayHeaders(20000));
Measured timings (Node, direct execution against this repo):
| Variant | n | input size | time |
|---|---|---|---|
N distinct-named [[name]] headers, no unrelated keys |
20,000 | 321 KB | 10.3 s |
| Same N with all-same-name headers (self-pruning, control) | 20,000 | 240 KB | 78 ms |
M unrelated top-level keys + N same-name [[name]] headers |
M=N=32,000 | 906 KB | 42.3 s |
The ~130x gap between the distinct-name and same-name cases at identical N and comparable input size isolates the mechanism precisely: the bug is unbounded Set growth from never-pruned entries, not string length or any other confound. A product-law check (varying M and N independently in the mixed variant) further confirmed genuine O(M·N) complexity.
Impact
Node.js is single-threaded — this synchronous, multi-second-to-tens-of-seconds compile blocks
the entire process event loop, standard uncontested Node.js behavior. The triggering document
shape — flat top-level config keys plus one or more array-of-tables sections (e.g. a [db]
settings block plus a [[servers]] list) — is unremarkable, common real-world TOML, not an
edge case. No authentication or special access is required; only the ability to get one TOML
string parsed by an application using this library.
Suggested remediation
Avoid scanning the entire assignedPaths/valueAssignments Sets on every [[name]] header.
Index entries by their top-level path segment (e.g. a Map<string, Set<string>> keyed by the
first key component) so addTableArray() only ever scans the bucket relevant to the path
being reopened, in time proportional to that bucket's size rather than the whole document's
accumulated path count:
var assignedByRoot = new Map(); // root segment -> Set<fullPath>
function addTableArray(node) {
var path = node.value;
var root = path[0];
var bucket = assignedByRoot.get(root) || new Set();
bucket.forEach(function(p) {
if (isSameOrSubPath(p, quotedPath)) bucket.delete(p);
});
// ...rest of addTableArray unchanged, reading/writing the per-root bucket
// instead of the global assignedPaths/valueAssignments Sets
}
As with the sibling finding, an input-size or table-count limit would also help as defense-in-depth.
Credit
Discovered and reported by SecDim Security Research secdim.com | @secdim | security@secdim.com
{
"affected": [
{
"database_specific": {
"last_known_affected_version_range": "\u003c= 5.0.0"
},
"package": {
"ecosystem": "npm",
"name": "toml"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "5.0.1"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2026-114141"
],
"database_specific": {
"cwe_ids": [
"CWE-407"
],
"github_reviewed": true,
"github_reviewed_at": "2026-10-22T16:38:44Z",
"nvd_published_at": "2026-10-21T21:17:56Z",
"severity": "HIGH"
},
"details": "## Summary\n\n`toml.parse()` is vulnerable to a quadratic-complexity (O(n\u00b2)) denial-of-service via many\narray-of-tables (`[[name]]`) headers. `addTableArray()` in `lib/compiler.js` rescans two\nentire bookkeeping Sets on every `[[name]]` header without pruning unrelated or distinct\nentries, so a document containing n such headers costs O(n\u00b2) compiler work. A ~321KB document\nof 20,000 distinct-named `[[name]]` blocks takes ~10.3 seconds to parse \u2014 a completely\nordinary-looking TOML shape (a flat settings block plus one or more array-of-tables sections),\nnot a contrived edge case. This is a separate, unpatched code path from the previously fixed\nstack-overflow DoS (`GHSA-82x6-q7mm-w9cf`) and requires no key nesting or dotted keys at all.\n\n## Affected component / version\n\n- Package: `toml` (npm), repository `BinaryMuse/toml-node`\n- Function: `addTableArray()` in `lib/compiler.js`\n- Confirmed present in the audited checkout at commit `1b2ac40` (2026-07-16), one commit past\n the `v5.0.0` tag (a changelog-only change) \u2014 i.e. present in `v5.0.0`, the latest release.\n Not exhaustively verified against every prior release, but the affected function is\n unrelated to `v5.0.0`\u0027s BigInt/Temporal changes (per `CHANGELOG.md`), so the defect likely\n predates that release as well.\n\n## Details\n\n`toml.parse(input, options)` (`index.js:5-9`) forwards the caller-supplied string to\n`parser.parse()` and then `compiler.compile()` with no length or structural validation. Every\n`[[name]]` (array-of-tables) header is routed (`reduce()`, `lib/compiler.js:43`) to\n`addTableArray()` (`lib/compiler.js:218-245`), which performs two full linear scans on every\ncall:\n\n```js\nassignedPaths.forEach(function(p) {\n if (isSameOrSubPath(p, quotedPath)) assignedPaths.delete(p);\n});\nvalueAssignments.forEach(function(p) {\n if (isSameOrSubPath(p, quotedPath)) valueAssignments.delete(p);\n});\n```\n(`lib/compiler.js:228-233`)\n\n`assignedPaths` and `valueAssignments` accumulate one entry per top-level key/table/array path\never assigned in the entire document. Each scan prunes only entries matching the *currently\nreopened* path via `isSameOrSubPath()` (`lib/compiler.js:319-321`: `path === prefix ||\npath.indexOf(prefix + \".\") === 0`); anything else \u2014 an unrelated top-level key, or simply a\n*different* array-of-tables name \u2014 is never removed and is rescanned in full on every\nsubsequent `[[name]]` header for the rest of the parse. `Set.prototype.forEach` has no early\nexit, so this is unconditionally O(current Set size) on every call, giving O(n\u00b2) total work\nfor n such headers.\n\n## Proof of Concept\n\nThe sharpest reproduction needs no unrelated keys at all \u2014 just N array-of-tables headers with\nN *distinct* names, since nothing is ever pruned when no name repeats:\n\n```js\nconst toml = require(\u0027toml\u0027);\n\nfunction distinctArrayHeaders(n) {\n let out = \u0027\u0027;\n for (let i = 0; i \u003c n; i++) out += `[[a${i}]]\\nv = 1\\n`;\n return out;\n}\n\n// ~321 KB input -- takes ~10.3 seconds\ntoml.parse(distinctArrayHeaders(20000));\n```\n\nMeasured timings (Node, direct execution against this repo):\n\n| Variant | n | input size | time |\n|---|---|---|---|\n| N distinct-named `[[name]]` headers, no unrelated keys | 20,000 | 321 KB | 10.3 s |\n| Same N with all-same-name headers (self-pruning, control) | 20,000 | 240 KB | 78 ms |\n| M unrelated top-level keys + N same-name `[[name]]` headers | M=N=32,000 | 906 KB | 42.3 s |\n\nThe ~130x gap between the distinct-name and same-name cases at identical N and comparable\ninput size isolates the mechanism precisely: the bug is unbounded Set growth from never-pruned\nentries, not string length or any other confound. A product-law check (varying M and N\nindependently in the mixed variant) further confirmed genuine O(M\u00b7N) complexity.\n\n## Impact\n\nNode.js is single-threaded \u2014 this synchronous, multi-second-to-tens-of-seconds compile blocks\nthe entire process event loop, standard uncontested Node.js behavior. The triggering document\nshape \u2014 flat top-level config keys plus one or more array-of-tables sections (e.g. a `[db]`\nsettings block plus a `[[servers]]` list) \u2014 is unremarkable, common real-world TOML, not an\nedge case. No authentication or special access is required; only the ability to get one TOML\nstring parsed by an application using this library.\n\n## Suggested remediation\n\nAvoid scanning the entire `assignedPaths`/`valueAssignments` Sets on every `[[name]]` header.\nIndex entries by their top-level path segment (e.g. a `Map\u003cstring, Set\u003cstring\u003e\u003e` keyed by the\nfirst key component) so `addTableArray()` only ever scans the bucket relevant to the path\nbeing reopened, in time proportional to that bucket\u0027s size rather than the whole document\u0027s\naccumulated path count:\n\n```js\nvar assignedByRoot = new Map(); // root segment -\u003e Set\u003cfullPath\u003e\n\nfunction addTableArray(node) {\n var path = node.value;\n var root = path[0];\n var bucket = assignedByRoot.get(root) || new Set();\n bucket.forEach(function(p) {\n if (isSameOrSubPath(p, quotedPath)) bucket.delete(p);\n });\n // ...rest of addTableArray unchanged, reading/writing the per-root bucket\n // instead of the global assignedPaths/valueAssignments Sets\n}\n```\n\nAs with the sibling finding, an input-size or table-count limit would also help as\ndefense-in-depth.\n\n## Credit\n\nDiscovered and reported by SecDim Security Research\nsecdim.com | @secdim | security@secdim.com",
"id": "GHSA-4qx8-w7c3-pj3p",
"modified": "2026-10-22T16:38:44Z",
"published": "2026-10-22T16:38:44Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/BinaryMuse/toml-node/security/advisories/GHSA-4qx8-w7c3-pj3p"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-114141"
},
{
"type": "WEB",
"url": "https://github.com/BinaryMuse/toml-node/commit/609c873fffea0a27ebe5b4dd098eed2b3daf3606"
},
{
"type": "PACKAGE",
"url": "https://github.com/BinaryMuse/toml-node"
},
{
"type": "WEB",
"url": "https://github.com/BinaryMuse/toml-node/releases/tag/v5.0.1"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N",
"type": "CVSS_V4"
}
],
"summary": "toml-node: Quadratic-complexity DoS via many array-of-tables headers in toml.parse()"
}
GHSA-4R8R-838Q-4CQX
Vulnerability from github – Published: 2026-11-24 18:31 – Updated: 2026-11-24 18:31Joomla! Core - [20261158] - Core - DoS in InputFilter tag cleaning in Joomla 1.5.0-5.4.10, 6.0.0-6.2.0 - Inefficient handling of unterminated tags in the tag cleaning of the input filter leads to a quadratic runtime, allowing denial of service attacks through large inputs.
{
"affected": [],
"aliases": [
"CVE-2026-129395"
],
"database_specific": {
"cwe_ids": [
"CWE-407"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2026-11-24T18:19:01Z",
"severity": "MODERATE"
},
"details": "Joomla! Core - [20261158] - Core - DoS in InputFilter tag cleaning in Joomla 1.5.0-5.4.10, 6.0.0-6.2.0 - Inefficient handling of unterminated tags in the tag cleaning of the input filter leads to a quadratic runtime, allowing denial of service attacks through large inputs.",
"id": "GHSA-4r8r-838q-4cqx",
"modified": "2026-11-24T18:31:02Z",
"published": "2026-11-24T18:31:02Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-129395"
},
{
"type": "WEB",
"url": "https://developer.joomla.org/security-centre/1156-20261158-core-dos-in-inputfilter-tag-cleaning.html"
},
{
"type": "WEB",
"url": "https://www.joomla.org"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X",
"type": "CVSS_V4"
}
]
}
GHSA-4RJQ-XVJH-92J2
Vulnerability from github – Published: 2026-10-30 15:34 – Updated: 2026-11-06 18:35DateTime::Lite versions before 0.8.1 for Perl allow CPU exhaustion via a per-day loop when adding seconds.
_normalize_leap_seconds crosses day boundaries one day at a time, so add(seconds => $n) on an object with a non-floating time zone takes about |$n|/86400 iterations, and nothing limits $n. The XS implementation and the pure-Perl fallback both have the loop.
An attacker who controls the number of seconds added can keep the process busy for as long as they choose.
{
"affected": [],
"aliases": [
"CVE-2026-87768"
],
"database_specific": {
"cwe_ids": [
"CWE-407"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2026-10-30T13:20:15Z",
"severity": "HIGH"
},
"details": "DateTime::Lite versions before 0.8.1 for Perl allow CPU exhaustion via a per-day loop when adding seconds.\n\n_normalize_leap_seconds crosses day boundaries one day at a time, so add(seconds =\u003e $n) on an object with a non-floating time zone takes about |$n|/86400 iterations, and nothing limits $n. The XS implementation and the pure-Perl fallback both have the loop.\n\nAn attacker who controls the number of seconds added can keep the process busy for as long as they choose.",
"id": "GHSA-4rjq-xvjh-92j2",
"modified": "2026-11-06T18:35:00Z",
"published": "2026-10-30T15:34:31Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-87768"
},
{
"type": "WEB",
"url": "https://metacpan.org/release/JDEGUEST/DateTime-Lite-v0.8.1/changes"
},
{
"type": "WEB",
"url": "http://www.openwall.com/lists/oss-security/2026/10/30/10"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-4RRR-2H4V-F3J9
Vulnerability from github – Published: 2026-02-03 15:30 – Updated: 2026-06-05 16:24An issue was discovered in 6.0 before 6.0.2, 5.2 before 5.2.11, and 4.2 before 4.2.28.
django.utils.text.Truncator.chars() and Truncator.words() methods (with html=True) and the truncatechars_html and truncatewords_html template filters allow a remote attacker to cause a potential denial-of-service via crafted inputs containing a large number of unmatched HTML end tags. Earlier, unsupported Django series (such as 5.0.x, 4.1.x, and 3.2.x) were not evaluated and may also be affected.
Django would like to thank Seokchan Yoon for reporting this issue.
{
"affected": [
{
"package": {
"ecosystem": "PyPI",
"name": "Django"
},
"ranges": [
{
"events": [
{
"introduced": "6.0a1"
},
{
"fixed": "6.0.2"
}
],
"type": "ECOSYSTEM"
}
]
},
{
"package": {
"ecosystem": "PyPI",
"name": "Django"
},
"ranges": [
{
"events": [
{
"introduced": "5.2a1"
},
{
"fixed": "5.2.11"
}
],
"type": "ECOSYSTEM"
}
]
},
{
"package": {
"ecosystem": "PyPI",
"name": "Django"
},
"ranges": [
{
"events": [
{
"introduced": "4.2a1"
},
{
"fixed": "4.2.28"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2026-1285"
],
"database_specific": {
"cwe_ids": [
"CWE-407"
],
"github_reviewed": true,
"github_reviewed_at": "2026-02-03T19:31:15Z",
"nvd_published_at": "2026-02-03T15:16:13Z",
"severity": "LOW"
},
"details": "An issue was discovered in 6.0 before 6.0.2, 5.2 before 5.2.11, and 4.2 before 4.2.28.\n\n`django.utils.text.Truncator.chars()` and `Truncator.words()` methods (with `html=True`) and the `truncatechars_html` and `truncatewords_html` template filters allow a remote attacker to cause a potential denial-of-service via crafted inputs containing a large number of unmatched HTML end tags. Earlier, unsupported Django series (such as 5.0.x, 4.1.x, and 3.2.x) were not evaluated and may also be affected.\n\nDjango would like to thank Seokchan Yoon for reporting this issue.",
"id": "GHSA-4rrr-2h4v-f3j9",
"modified": "2026-06-05T16:24:26Z",
"published": "2026-02-03T15:30:23Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-1285"
},
{
"type": "WEB",
"url": "https://github.com/django/django/commit/a33540b3e20b5d759aa8b2e4b9ca0e8edd285344"
},
{
"type": "WEB",
"url": "https://docs.djangoproject.com/en/dev/releases/security"
},
{
"type": "PACKAGE",
"url": "https://github.com/django/django"
},
{
"type": "WEB",
"url": "https://github.com/pypa/advisory-database/tree/main/vulns/django/PYSEC-2026-45.yaml"
},
{
"type": "WEB",
"url": "https://groups.google.com/g/django-announce"
},
{
"type": "WEB",
"url": "https://www.djangoproject.com/weblog/2026/feb/03/security-releases"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N/E:U",
"type": "CVSS_V4"
}
],
"summary": "Django has Inefficient Algorithmic Complexity"
}
No mitigation information available for this CWE.
No CAPEC attack patterns related to this CWE.