Skip to content

Commit 27e3517

Browse files
1 parent 5c91f70 commit 27e3517

2 files changed

Lines changed: 164 additions & 0 deletions

File tree

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
{
2+
"schema_version": "1.4.0",
3+
"id": "GHSA-48c2-rrv3-qjmp",
4+
"modified": "2026-03-25T20:08:24Z",
5+
"published": "2026-03-25T20:08:24Z",
6+
"aliases": [
7+
"CVE-2026-33532"
8+
],
9+
"summary": "yaml is vulnerable to Stack Overflow via deeply nested YAML collections",
10+
"details": "Parsing a YAML document with `yaml` may throw a RangeError due to a stack overflow.\n\nThe node resolution/composition phase uses recursive function calls without a depth bound. An attacker who can supply YAML for parsing can trigger a `RangeError: Maximum call stack size exceeded` with a small payload (~2–10 KB). The `RangeError` is not a `YAMLParseError`, so applications that only catch YAML-specific errors will encounter an unexpected exception type. Depending on the host application's exception handling, this can fail requests or terminate the Node.js process.\n\nFlow sequences allow deep nesting with minimal bytes (2 bytes per level: one `[` and one `]`). On the default Node.js stack, approximately 1,000–5,000 levels of nesting (2–10 KB input) exhaust the call stack. The exact threshold is environment-dependent (Node.js version, stack size, call stack depth at invocation).\n\nNote: the library's `Parser` (CST phase) uses a stack-based iterative approach and is not affected. Only the compose/resolve phase uses actual call-stack recursion.\n\nAll three public parsing APIs are affected: `YAML.parse()`, `YAML.parseDocument()`, and `YAML.parseAllDocuments()`.\n\n### PoC\n\n```javascript\nconst YAML = require('yaml');\n\n// ~10 KB payload: 5000 levels of nested flow sequences\nconst payload = '['.repeat(5000) + '1' + ']'.repeat(5000);\n\ntry {\n YAML.parse(payload);\n} catch (e) {\n console.log(e.constructor.name); // RangeError (NOT YAMLParseError)\n console.log(e.message); // Maximum call stack size exceeded\n}\n```\n\nTest environment: Node.js v24.12.0, macOS darwin arm64\n\n| Version | Nesting Depth | Input Size | Result |\n|---|---|---|---|\n| 1.0.0 | 5,000 | 10,001 B | RangeError |\n| 1.10.2 | 5,000 | 10,001 B | RangeError |\n| 2.0.0 | 5,000 | 10,001 B | RangeError |\n| 2.8.2 | 5,000 | 10,001 B | RangeError |\n| 2.8.3 | 5,000 | 10,001 B | YAMLParseError |\n\nDepth threshold on yaml 2.8.2:\n\n| Nesting Depth | Input Size | Result |\n|---|---|---|\n| 500 | 1,001 B | Parses successfully |\n| 1,000 | 2,001 B | RangeError (threshold varies by stack size) |\n| 5,000 | 10,001 B | RangeError |",
11+
"severity": [
12+
{
13+
"type": "CVSS_V3",
14+
"score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:L"
15+
}
16+
],
17+
"affected": [
18+
{
19+
"package": {
20+
"ecosystem": "npm",
21+
"name": "yaml"
22+
},
23+
"ranges": [
24+
{
25+
"type": "ECOSYSTEM",
26+
"events": [
27+
{
28+
"introduced": "2.0.0"
29+
},
30+
{
31+
"fixed": "2.8.3"
32+
}
33+
]
34+
}
35+
]
36+
},
37+
{
38+
"package": {
39+
"ecosystem": "npm",
40+
"name": "yaml"
41+
},
42+
"ranges": [
43+
{
44+
"type": "ECOSYSTEM",
45+
"events": [
46+
{
47+
"introduced": "1.0.0"
48+
},
49+
{
50+
"fixed": "1.10.3"
51+
}
52+
]
53+
}
54+
]
55+
}
56+
],
57+
"references": [
58+
{
59+
"type": "WEB",
60+
"url": "https://github.com/eemeli/yaml/security/advisories/GHSA-48c2-rrv3-qjmp"
61+
},
62+
{
63+
"type": "WEB",
64+
"url": "https://github.com/eemeli/yaml/commit/1e84ebbea7ec35011a4c61bbb820a529ee4f359b"
65+
},
66+
{
67+
"type": "PACKAGE",
68+
"url": "https://github.com/eemeli/yaml"
69+
},
70+
{
71+
"type": "WEB",
72+
"url": "https://github.com/eemeli/yaml/releases/tag/v1.10.3"
73+
},
74+
{
75+
"type": "WEB",
76+
"url": "https://github.com/eemeli/yaml/releases/tag/v2.8.3"
77+
}
78+
],
79+
"database_specific": {
80+
"cwe_ids": [
81+
"CWE-674"
82+
],
83+
"severity": "MODERATE",
84+
"github_reviewed": true,
85+
"github_reviewed_at": "2026-03-25T20:08:24Z",
86+
"nvd_published_at": null
87+
}
88+
}
Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
{
2+
"schema_version": "1.4.0",
3+
"id": "GHSA-73vx-49mv-v8w5",
4+
"modified": "2026-03-25T20:09:09Z",
5+
"published": "2026-03-25T20:09:09Z",
6+
"aliases": [
7+
"CVE-2026-33548"
8+
],
9+
"summary": "MantisBT has Stored HTML Injection/XSS when displaying Tags in Timeline",
10+
"details": "Improper escaping of tag names retrieved from History in Timeline (my_view_page.php) allows an attacker to inject HTML and, if CSP settings permit, achieve execution of arbitrary JavaScript, when displaying a tag that has been renamed or deleted.\n\n### Impact\nCross-site scripting (XSS).\n\n### Patches\nf32787c14d4518476fe7f05f992dbfe6eaccd815\n\n### Workarounds\n* Edit offending History entries (using SQL)\n* Wrap `$this->tag_name` in a string_html_specialchars() call in IssueTagTimelineEvent::html()\n\n### Credits\nMantisBT thanks Vishal Shukla for discovering and responsibly reporting the issue.",
11+
"severity": [
12+
{
13+
"type": "CVSS_V3",
14+
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N"
15+
},
16+
{
17+
"type": "CVSS_V4",
18+
"score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N"
19+
}
20+
],
21+
"affected": [
22+
{
23+
"package": {
24+
"ecosystem": "Packagist",
25+
"name": "mantisbt/mantisbt"
26+
},
27+
"ranges": [
28+
{
29+
"type": "ECOSYSTEM",
30+
"events": [
31+
{
32+
"introduced": "2.28.0"
33+
},
34+
{
35+
"fixed": "2.28.2"
36+
}
37+
]
38+
}
39+
],
40+
"versions": [
41+
"2.28.0"
42+
]
43+
}
44+
],
45+
"references": [
46+
{
47+
"type": "WEB",
48+
"url": "https://github.com/mantisbt/mantisbt/security/advisories/GHSA-73vx-49mv-v8w5"
49+
},
50+
{
51+
"type": "ADVISORY",
52+
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-33548"
53+
},
54+
{
55+
"type": "WEB",
56+
"url": "https://github.com/mantisbt/mantisbt/commit/f32787c14d4518476fe7f05f992dbfe6eaccd815"
57+
},
58+
{
59+
"type": "PACKAGE",
60+
"url": "https://github.com/mantisbt/mantisbt"
61+
},
62+
{
63+
"type": "WEB",
64+
"url": "https://mantisbt.org/bugs/view.php?id=36973"
65+
}
66+
],
67+
"database_specific": {
68+
"cwe_ids": [
69+
"CWE-79"
70+
],
71+
"severity": "HIGH",
72+
"github_reviewed": true,
73+
"github_reviewed_at": "2026-03-25T20:09:09Z",
74+
"nvd_published_at": "2026-03-23T20:16:27Z"
75+
}
76+
}

0 commit comments

Comments
 (0)