CVE
CVE-2026-78206, CVE-2026-78207, CVE-2026-78208, CVE-2026-78209, CVE-2026-128336, CVE-2026-128337, CVE-2026-128338, CVE-2026-128339, CVE-2026-128340, CVE-2026-128341, CVE-2026-128342, CVE-2026-128343, CVE-2026-128344, CVE-2026-128345, CVE-2026-128346, CVE-2026-128347, CVE-2026-128348, CVE-2026-127208
CWE
CWE-1321, CWE-73, CWE-770, CWE-606, CWE-1333, CWE-459, CWE-116, CWE-94
Affected Surface
- Node.js applications that use the npm package `exceljs` through 4.4.0 (all published versions, including `4.4.1-prerelease.0`) to read uploaded or third-party .xlsx files with `workbook.xlsx.load()`, `xlsx.readFile()` or `stream.xlsx.WorkbookReader`
- Node.js applications that pass user-influenced paths to `addImage({ filename })` on `stream.xlsx.WorkbookWriter` (`CVE-2026-128347`) or the regular `Workbook`
- Developer workstations, CI pipelines and services that run `datamodel-code-generator` before 0.84.0 on JSON Schema or OpenAPI documents they don't control, and then import the generated Pydantic v2 models
TL;DR
VulnCheck published CVEs for two libraries on 12 and 13 November 2026. Both put attacker-controlled documents into code that trusts them. Neither has reported exploitation.
- ExcelJS (13 CVEs, no fix).
exceljswas downloaded 28,096,529 times from npm in the week of 8 to 14 November. Its latest release, 4.4.0, came out on 19 October 2023, and the last commit onmasterwas on 12 January 2024. All thirteen CVEs are filed against “ExcelJS through 4.4.0”, and every one is still present upstream. A crafted .xlsx loaded withworkbook.xlsx.load()can polluteObject.prototypefor the whole process (CVE-2026-128337, CVSS 4.0 8.3;CVE-2026-128336, 6.3), or kill it with a heap out-of-memory abort thattry/catchcan’t stop (CVE-2026-128338,128339,128340,128341,128344, all 8.7). The streaming writer’saddImageembeds any local file the process can read when it’s given a path like../../../../etc/passwd(CVE-2026-128347, 8.7). The advisories come fromexceljs-hardened, an unofficial fork, not from the ExcelJS maintainers. The same fork got four CVEs in August, among them a CVSS 4.0 9.3 prototype pollution throughcell.note(CVE-2026-78207) and path traversal in the regularWorkbook#addImage(CVE-2026-78208). That brings ExcelJS 4.4.0 to 17 open CVEs. - datamodel-code-generator (
CVE-2026-127208, CVSS 4.0 8.6). The generator copiesx-python-typeannotations from a schema into the Python models it writes. Before 0.84.0 it accepted a quoted string inside a subscript, such aslist["__import__('os').system('id')"]. Pydantic v2 treats that string as a forward reference and evaluates it witheval()when the model is built. So importing models generated from someone else’s schema could run that schema’s code. Fixed in 0.84.0 (15 October). The package has about 4 million weekly downloads on PyPI.
What to do now: find every service that parses user-supplied spreadsheets with ExcelJS and move that parsing into a worker thread or child process with a memory cap and a timeout, run it with node --disable-proto=delete, and never hand addImage a path built from user input. Upgrade datamodel-code-generator to 0.84.0 or later and stop generating models from schemas you haven’t reviewed.
Affected packages and projects
| Ecosystem | Package | CVE | Severity (CVSS 4.0) | Affected versions | Fixed or safe version |
|---|---|---|---|---|---|
| npm | exceljs | CVE-2026-128337 (prototype pollution via x14:cfRule id="__proto__") | High, 8.3 | <= 4.4.0 | None upstream |
| npm | exceljs | CVE-2026-128336 (prototype pollution via a __proto__ defined-name sheet) | Medium, 6.3 | <= 4.4.0 | None upstream |
| npm | exceljs | CVE-2026-128347 (local file read through streaming addImage) | High, 8.7 | <= 4.4.0 | None upstream |
| npm | exceljs | CVE-2026-128338, 128339, 128340, 128341, 128344 (heap OOM from <col max>, <mergeCell>, defined names, sqref, image anchors) | High, 8.7 | <= 4.4.0 | None upstream |
| npm | exceljs | CVE-2026-128342, 128343 (event loop blocked by huge sheetId or row r) | High, 8.7 | <= 4.4.0 | None upstream |
| npm | exceljs | CVE-2026-128346 (temp files and descriptors leaked by WorkbookReader) | High, 8.7 | <= 4.4.0 | None upstream |
| npm | exceljs | CVE-2026-128345 (ReDoS in shared formula translation) | Medium, 6.9 | <= 4.4.0 | None upstream |
| npm | exceljs | CVE-2026-128348 (formula injection through table column names) | Low, 2.3 | <= 4.4.0 | None upstream |
| npm | exceljs | Earlier batch, published 24 August: CVE-2026-78206 (unbounded ZIP decompression), CVE-2026-78207 (prototype pollution via cell.note and _.deepMerge, 9.3), CVE-2026-78208 (Workbook#addImage path traversal, 8.7), CVE-2026-78209 (CSV formula injection) | Up to critical | <= 4.4.0 | None upstream |
| PyPI | datamodel-code-generator | CVE-2026-127208 (code injection via x-python-type) | High, 8.6 | < 0.84.0 | 0.84.0 |
The GitHub Advisory Database imported the ExcelJS CVEs from NVD without a package mapping (“No package listed”), so Dependabot and npm audit won’t report them. EPSS on 14 November was 0.56% for CVE-2026-128347 and 0.37% for CVE-2026-127208.
Technical analysis
1. ExcelJS: an .xlsx is a ZIP of XML that the parser believes
An .xlsx file is a ZIP archive of XML parts. ExcelJS reads those parts and builds its in-memory model straight from the attribute values. Nearly every bug in this batch comes from that: a key or a number from the file reaches an object lookup or a loop bound without a check.
CVE-2026-128337: __proto__ as a rule id. Conditional formatting can be split between the main worksheet XML and an x14 extension block, and ExcelJS stitches the two together by rule id. Here is mergeConditionalFormattings from 4.4.0 (lib/xlsx/xform/sheet/worksheet-xform.js):
const mergeRule = (rule, extRule) => {
Object.keys(extRule).forEach(key => {
const value = rule[key];
const extValue = extRule[key];
if (value === undefined && extValue !== undefined) {
rule[key] = extValue; // writes onto whatever `rule` is
}
});
};
...
const ruleMap = {}; // plain object, inherits from Object.prototype
model.forEach(cf => {
cf.rules.forEach(rule => {
const {x14Id} = rule;
if (x14Id) {
ruleMap[x14Id] = rule;
}
});
});
extModel.forEach(extCf => {
extCf.rules.forEach(extRule => {
const rule = ruleMap[extRule.x14Id]; // x14Id comes from <x14:cfRule id="...">
if (rule) {
mergeRule(rule, extRule);
ruleMap is {}. If the file sets <x14:cfRule type="dataBar" id="__proto__">, then ruleMap['__proto__'] doesn’t return undefined. It returns Object.prototype, which is truthy. mergeRule() then copies every property of the extension rule onto Object.prototype. The fork’s proof of concept ends with ({}).type === 'dataBar', along with direction, border, cfvo, gradient and other properties now present on every object in the process. Those are common property names. Code anywhere in the application that does if (opts.type) or options.direction || 'asc' now sees attacker-chosen values until the process restarts.
CVE-2026-128336 is the same mistake in another place. CellMatrix.getCellAt() does this.sheets[sheetName] || (this.sheets[sheetName] = []), and a <definedName> whose range points at a sheet called __proto__ makes ExcelJS write empty arrays under numeric keys onto Object.prototype.
CVE-2026-128339 and friends: one cell range, billions of objects. Merged cells come from <mergeCell ref="...">, and _mergeCellsInternal touches every cell inside the range:
const master = this.getCell(dimensions.top, dimensions.left);
for (let i = dimensions.top; i <= dimensions.bottom; i++) {
for (let j = dimensions.left; j <= dimensions.right; j++) {
if (i > dimensions.top || j > dimensions.left) {
this.getCell(i, j).merge(master, ignoreStyle); // allocates a Row and a Cell
}
}
}
ref="A1:XFD1048576" is the whole sheet, 1,048,576 × 16,384 cells. A few bytes of XML makes xlsx.load() allocate Row and Cell objects until V8 gives up with FATAL ERROR: ... JavaScript heap out of memory. That aborts the process. It isn’t an exception, so no try/catch or promise rejection handler runs. The same pattern turns up in <col min max> (CVE-2026-128338), defined-name ranges (CVE-2026-128340), data validation sqref (CVE-2026-128341, range.forEachAddress(...) over the whole range) and image anchor columns (CVE-2026-128344). A huge sheetId or row number doesn’t allocate much but makes later loops walk a sparse array of that length (CVE-2026-128342, CVE-2026-128343). In a web service that means one upload takes down a worker, and the same upload retried takes down the next one.
Two of these were reported upstream by people who had nothing to do with the fork: issue #3093 on 5 October (sqref) and issue #3107 on 6 November (mergeCell). Both are still open. So is the only proposed fix, PR #3114 (12 November), which bounds merge ranges to Excel’s grid:
_mergeCellsInternal(dimensions, ignoreStyle) {
+ if (
+ dimensions.top < 1 ||
+ dimensions.left < 1 ||
+ dimensions.bottom > 1048576 ||
+ dimensions.right > 16384
+ ) {
+ throw new Error(
+ 'Out of bounds. Excel supports rows from 1 to 1048576 and columns from 1 to 16384'
+ );
+ }
+ if (dimensions.count > 1000000) {
+ throw new Error(
+ `Merge range ${dimensions} is too large (${dimensions.count} cells)`
+ );
+ }
CVE-2026-128347: addImage reads whatever path it’s given. This one is about writing workbooks, not reading them. Both writers take an image as { filename }, { buffer } or { base64 }. With filename, ExcelJS opens that path and stores its bytes under xl/media/ in the output. The streaming writer (lib/stream/xlsx/workbook-writer.js) does it like this:
addMedia() {
return Promise.all(
this.media.map(medium => {
if (medium.type === 'image') {
const filename = `xl/media/${medium.name}`;
if (medium.filename) {
return this.zip.file(medium.filename, {name: filename}); // any readable path
}
If an application builds that path from a request (a logo name, a template id, an avatar file), then ../../../../etc/passwd, or an absolute path, puts that file inside the spreadsheet the user downloads. This CVE covers the streaming writer. The regular Workbook#addImage has the same problem and its own CVE from August (CVE-2026-78208): in upstream 4.4.0 it carries a // TODO: validation? comment, and lib/xlsx/xlsx.js passes medium.filename straight to fs.readFile. The fork’s advisory says Workbook#addImage “rejects the same input”, but that check only exists in the fork. Treat both writers as unsafe for paths you didn’t choose.
The other two. CVE-2026-128346: if a multi-sheet workbook puts its worksheets before xl/sharedStrings.xml, WorkbookReader spools them to temp files, and when parsing fails or the caller stops iterating early, those files and descriptors are never cleaned up. Repeated uploads fill /tmp or hit the descriptor limit. CVE-2026-128345 is quadratic regex backtracking in slideFormula on long shared formulas. CVE-2026-128348 is a low-severity formula injection: table column names aren’t escaped in the totals-row formula, so a CSV header containing ] can smuggle in a HYPERLINK.
About the fork. mateocallec/exceljs-hardened was created on 23 August 2026 and is published to npm as exceljs-hardened (5.1.0, 16 October) by a single maintainer. Its description says it is “Not affiliated with the original exceljs maintainers”. It lists 29 repository advisories against ExcelJS, 12 of them without a CVE. That fork is the only place with fixes right now. Switching your spreadsheet parser to a new single-maintainer package is a supply chain decision in its own right, so review it the way you’d review any new dependency: read the diff against upstream 4.4.0, pin an exact version, and watch who publishes new releases.
2. datamodel-code-generator: a type annotation that is really a string to eval()
datamodel-code-generator turns JSON Schema and OpenAPI documents into Pydantic models. It supports a custom x-python-type keyword so a schema can name the exact Python type for a field. That string goes into the generated source, so the generator parses it with ast and allows only names, subscripts, unions and literal values. Before 0.84.0, string constants were allowed anywhere a literal was. The vulnerable branch in _python_type_expr_from_ast():
case ast.Subscript(value=value, slice=slice_node):
base = _python_type_expr_from_ast(value, allow_literal=False)
...
arguments = (_python_type_expr_from_ast(slice_node, allow_literal=True),)
...
case ast.Constant(value=value) if allow_literal and isinstance(value, _LITERAL_VALUE_TYPES):
return PythonTypeLiteralValue(value) # a str passes here
A schema property like this one passed validation:
{ "type": "array", "x-python-type": "list[\"__import__('os').system('id')\"]" }
and was written into the generated model as a quoted annotation, along these lines:
class Model(BaseModel):
items: list["__import__('os').system('id')"]
To Pydantic v2, a quoted string inside a type annotation is a forward reference. When the class is built or model_rebuild() runs, Pydantic resolves it by evaluating the string as a Python expression. The command runs wherever the generated module gets imported: a developer laptop, a CI job that generates the models and then runs tests against them, or a service that generates models from a schema at runtime. Because the annotation looks like an ordinary type, it is easy to miss in code review.
The fix (commit ebfc11d, merged on 25 September and released in 0.84.0 on 15 October) only allows string and bytes constants as arguments to Literal[...]:
+def _is_literal_base(base: PythonTypeExpr) -> bool:
+ if isinstance(base, PythonTypeQualifiedName):
+ return base.parts[-1] == "Literal"
+ return getattr(base, "value", None) == "Literal"
...
case ast.Subscript(value=value, slice=slice_node):
base = _python_type_expr_from_ast(value, allow_literal=False)
+ strings_allowed = _is_literal_base(base)
...
+ case ast.Constant(value=value) if allow_literal and isinstance(value, (str, bytes)):
+ if not allow_string_literal:
+ raise _InvalidPythonTypeAnnotationError
+ return PythonTypeLiteralValue(value)
The 0.84.0 release notes list the issue under GHSA-qxmr-3m23-97jm and warn that legitimate annotations with quoted names, such as list["Foo"] or Annotated[str, "meta"], now stop generation with exit code 2. If your build breaks after upgrading, that’s the reason. The repository’s advisory hadn’t been published to the GitHub Advisory Database when this was written. VulnCheck assigned the CVE on 12 November.
The project has had other schema-to-code bugs this year (a customBasePath code injection in August, XSD schemaLocation file read and SSRF bypasses in June). The lesson is the same each time: treat a schema like code. If it came from a partner API, a public registry or a pull request, review it before you generate from it, and run generation in a sandbox without secrets.
IOCs
Neither issue has been tied to a campaign. Things to look for:
- ExcelJS: Node processes exiting with
FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memoryorIneffective mark-compacts near heap limitright after an upload endpoint receives an .xlsx. Uploaded workbooks whose XML containsid="__proto__",name="__proto__"or a sheet named__proto__,ref="A1:XFD1048576"or similar whole-sheet ranges,<col ... max="values above 16384, or rowr/sheetIdvalues in the millions. Manyexceljs-*temp files piling up inos.tmpdir(). - ExcelJS
addImage: generated workbooks whosexl/media/entries aren’t images (fileon the extracted entry reports text, ELF or PEM data), and request parameters with../or absolute paths going to image or logo fields. - datamodel-code-generator:
x-python-typevalues in schemas that contain a quote character outsideLiteral[...], especially with__import__,exec,eval,os.,subprocessorgetattr. In generated code, quoted annotations that aren’t plain class names.
Detection and remediation
Find ExcelJS, including transitive copies:
npm ls exceljs --all
pnpm why exceljs ; yarn why exceljs
grep -nE '"exceljs"|/exceljs@|exceljs@' package-lock.json pnpm-lock.yaml yarn.lock 2>/dev/null
grep -rnE "xlsx\.(load|readFile|read)\(|stream\.xlsx\.WorkbookReader|addImage\(\s*\{[^}]*filename" \
--include='*.js' --include='*.ts' --include='*.mjs' --include='*.cjs' src/ lib/ server/ 2>/dev/null
Anything that resolves to exceljs is affected, because no fixed upstream version exists. What matters is whether untrusted files reach xlsx.load(), xlsx.readFile(), xlsx.read() or WorkbookReader, and whether user input reaches addImage({ filename }).
Contain spreadsheet parsing until there’s a fix:
- Parse in a
worker_threadsWorker withresourceLimits: { maxOldGenerationSizeMb: 256 }(or a child process started with--max-old-space-size), and terminate it after a few seconds. An OOM then kills the worker, not the server. - Start that worker or process with
node --disable-proto=delete. This removes theObject.prototype.__proto__accessor, soruleMap['__proto__']returnsundefinedand the two pollution paths do nothing. We checked that a normal ExcelJS 4.4.0 write-and-load round trip works with the flag on Node 22. Test your own code paths before turning it on across a whole service. - Before calling ExcelJS, cap the upload size and the total uncompressed size of the ZIP entries, and reject workbooks whose XML contains
__proto__or ranges beyondXFD1048576. - For
addImage, pass{ buffer }that you read yourself from an allowlisted path, never{ filename }built from a request. - Stream readers: always run
WorkbookReaderto completion or destroy the underlying stream in afinally, and cleanos.tmpdir()on a schedule.
If you decide to switch to exceljs-hardened, pin an exact version, diff it against upstream 4.4.0 first, and add it to whatever review you do for new dependencies. If you can drop the dependency or replace it with a maintained parser for your use case, that removes the problem rather than containing it.
datamodel-code-generator:
pip show datamodel-code-generator | grep -i '^version' # needs 0.84.0+
grep -rnE 'datamodel-code-generator' requirements*.txt pyproject.toml poetry.lock uv.lock Pipfile.lock 2>/dev/null
grep -rn 'x-python-type' schemas/ openapi/ api/ 2>/dev/null | grep -v 'Literal\['
grep -rnE ':\s*[A-Za-z_.]+\[.*"[^"]*(__import__|exec|eval|system)\b' --include='*.py' models/ generated/ 2>/dev/null
Upgrade with pip install -U 'datamodel-code-generator>=0.84.0' and regenerate your models. If you generated models from an external schema with an older version and imported them in CI, check the generated files for quoted annotations. If you find one you can’t explain, rotate the credentials that job had: cloud keys, registry and package publishing tokens, and the GITHUB_TOKEN scope.
Timeline
- 2023-10-19: ExcelJS 4.4.0 is published. It is still the
latesttag. - 2024-01-12: Last commit on
exceljs/exceljsmaster. - 2024-12-20:
exceljs@4.4.1-prerelease.0is published to npm. - 2026-08-23:
mateocallec/exceljs-hardenedis forked,exceljs-hardenedis first published to npm, and the fork publishes its first four advisories. - 2026-08-24: NVD publishes
CVE-2026-78206toCVE-2026-78209against ExcelJS through 4.4.0. - 2026-09-25: datamodel-code-generator merges the
x-python-typefix (ebfc11d). - 2026-10-05: ExcelJS issue #3093 reports the
sqrefresource exhaustion. - 2026-10-15: datamodel-code-generator 0.84.0 is released with the fix.
- 2026-10-16: The fork publishes 20 repository advisories against ExcelJS and releases
exceljs-hardened5.1.0. - 2026-11-06: ExcelJS issue #3107 reports the
mergeCellOOM. - 2026-11-12: PR #3114 proposes bounding merge ranges in upstream ExcelJS (still open). VulnCheck publishes its advisories, and NVD publishes
CVE-2026-127208at 21:17 UTC. - 2026-11-13: NVD publishes the thirteen ExcelJS CVEs at 10:18 UTC. The GitHub Advisory Database imports them without a package mapping.
From research to remediation
Check whether this pattern exists in your codebase
Turn this research into a remediation workflow. Scan dependencies and package manifests for similar supply-chain risk, then prioritize fixes with reachability context.
References
- VulnCheck: ExcelJS through 4.4.0 Prototype Pollution via x14 Conditional Formatting Rule ID (CVE-2026-128337)
- VulnCheck: ExcelJS through 4.4.0 Arbitrary File Read via WorkbookWriter addImage filename (CVE-2026-128347)
- NVD: CVE-2026-128337
- NVD: CVE-2026-128339
- mateocallec/exceljs-hardened GHSA-86ch-m4gp-r5xf: Prototype pollution through a conditional formatting extension id
- mateocallec/exceljs-hardened GHSA-f9m8-8qmf-qq29: Missing path traversal check in the streaming writer's addImage
- exceljs/exceljs issue #3107: workbook.xlsx.load aborts with JavaScript heap OOM on a single large mergeCell range
- exceljs/exceljs issue #3093: crafted dataValidation sqref causes unbounded CPU/memory use
- exceljs/exceljs PR #3114: reject oversized merge ranges instead of OOMing (open)
- GitHub Advisory Database: GHSA-2vgm-9qpx-xwqx (CVE-2026-128337)
- VulnCheck: datamodel-code-generator < 0.84.0 Code Injection via x-python-type Annotation (CVE-2026-127208)
- datamodel-code-generator commit ebfc11d: reject string constants outside Literal[...] in x-python-type
- datamodel-code-generator release 0.84.0 (Security section, GHSA-qxmr-3m23-97jm)
- NVD: CVE-2026-127208