libexpat lets a document’s internal DTD subset declare default attributes for an element, and on every start tag of that element storeAtts() in lib/xmlparse.c has to add the defaults the tag did not supply. The VulnCheck CNA record says the function “scans valueless default attribute declarations for every start tag”, attributes declared #IMPLIED that have no value to add, so that a document declaring many of them “for one element followed by many start tags” causes “quadratic CPU consumption”. The record scores it CVSS 4.0 8.7 and CVSS 3.1 7.5 as a network-reachable denial of service with no preconditions. The fix is pull request #1535, reworked after review and approved by the maintainer on 1 December with the note “I will request a CVE, wait for it, put in the PR title and then merge”; it is not merged, its milestone is 2.12.0, and no release carries it. Treat a CPU spike in a process parsing untrusted XML with an internal DTD as a possible instance of this, keep DTD-bearing documents away from parsers that do not need them, and update libexpat when 2.12.0 names this CVE.
CVE-2026-141595 at a glance.
| Component | libexpat, storeAtts() in expat/lib/xmlparse.c: the per-tag loop over an element’s DEFAULT_ATTRIBUTE list (the record points at lines 4510 to 4513 of the 2.11.0 tag) |
| Affected versions | every libexpat release through 2.11.0 (the record: 0 to 2.11.0 inclusive); 2.11.0 of 23 November 2026 is the current release and its Changes file does not mention this CVE |
| Fixed in | not released on 2 December 2026: pull request #1535, “lib: Avoid per-tag scan over valueless default attributes”, by Nurullah Özatak, opened 26 November, reworked after review and approved 1 December, milestone 2.12.0, open and unmerged; the maintainer’s comment is that it will be merged once the CVE id is in its title. Two commits: the loop now walks a valueDefaultIndex array of the attributes that have a value instead of the whole list, and dtdCopy() allocates that index before the attribute block so a failed allocation leaks nothing. This is the unknown field that keeps the page a draft |
| Severity | VulnCheck (CNA) CVSS 4.0 8.7 High (AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N) and CVSS 3.1 7.5 (AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H), CWE-407 (inefficient algorithmic complexity). No NVD record and no distribution rating on 2 December: the record was published at 01:08 UTC that day |
| Exploited in the wild | Not on the CISA KEV catalogue (2026.11.30). EPSS: no score yet on 2 December 2026 |
| Who is exposed | Any program that hands untrusted XML to libexpat and lets the document carry an internal DTD subset, which is the default: nothing in the API refuses a <!DOCTYPE> unless the application installs a handler that does. The cost is CPU time in the parsing process, proportional to the declared-attribute count times the start-tag count, with no memory growth and no corruption. Applications that reject DTDs, or parse only documents they generate, are not in the path |
| Published | CVE record 2 December 2026, 01:08 UTC (VulnCheck CNA); this page built 2 December 2026 as a draft, last updated 2 December 2026 |
What it is
An attribute-list declaration in a DTD can give an attribute a default value, or declare it #IMPLIED, which means the attribute may be absent and has no default. libexpat keeps both kinds on the element’s default-attribute list, and when a start tag of that element arrives storeAtts() walks the list to add any defaulted attribute the tag left out. For the #IMPLIED entries there is nothing to add, but the loop visited them anyway, so the work per start tag was the length of the whole list rather than the number of attributes that have a value. A document is free to declare as many attributes for one element as it likes in its internal subset and then open that element as many times as it likes; the two counts multiply.
That shape, a declaration section that makes every later tag cost more, is the same one libexpat fixed in CVE-2026-137992 three weeks ago, where repeated attribute-list declarations were the multiplier. Here it is a single declaration with many names. The record’s reference into the 2.11.0 source is the four-line loop, and the VulnCheck advisory, which carries the same text, credits Nurullah Özatak, who also wrote the fix. Neither the record nor the advisory says anything about exploitation or a public reproducer.
The fix in pull request #1535 keeps a separate index of the default attributes that have a value, valueDefaultIndex, and walks that instead, so the per-tag cost no longer grows with the #IMPLIED count; a second change fixes the allocation order in dtdCopy() so a failed index allocation cannot leak the attribute block, and four tests cover implied defaults added without a value. The pull request was opened on 26 November with an empty description, closed, reopened on 30 November with the rework, and approved on 1 December; the maintainer’s stated plan is to merge once the CVE id is in the title, and the milestone is 2.12.0. The GitHub rendering of the master Changes file was stale on 2 December (it still showed 2.10.0 at the top), so whether 2.12.0 has a date is not something this page can say; the 2.11.0 Changes entry, read at its tag, lists three other CVEs and not this one.
Who is affected on Linux
Each row is what the distribution’s own security tracker said on 2 December 2026; the link in the row is the tracker page, which will be newer than this one. The record is hours old and none of the trackers had an entry, so the table is empty of statuses and nothing in it is inferred; every distribution ships libexpat, and every one is at or below 2.11.0.
| Distribution | Status | Fixed package |
|---|---|---|
| Alpine | Not consulted for this page: the Alpine tracker refused the automated reader on 2 December 2026 | — |
| Debian | No entry yet: the tracker returned a client error for this id on 2 December 2026, hours after the record was published; nothing inferred | — |
| Ubuntu | No entry yet: ubuntu.com returned a client error for this id on 2 December 2026; nothing inferred | — |
| RHEL, Rocky, Alma, CentOS Stream | No entry yet: the hydra JSON returned a client error for this id on 2 December 2026; nothing inferred | — |
| openSUSE/SLE | Not consulted: suse.com refused the automated reader on 2 December 2026 (client error) | — |
Static and vendored copies: Python’s bundled pyexpat, language runtimes, embedded firmware, container images built from source | The upstream release applies once it exists; each bundle is fixed when its own project rebuilds against it | per bundle, after 2.12.0 |
How to check
Two questions: which libexpat is installed and which processes have it mapped, and does any of them parse documents from outside with DTDs allowed. The first is a package question; the second is a per-application one, and the only way to answer it is to know whether the program installs a doctype handler that stops the parser.
# 1. which libexpat is installed (every release through 2.11.0 is affected), and who has it loaded
dpkg -l libexpat1 2>/dev/null | awk '/^ii/ {print $2, $3}'; rpm -q expat 2>/dev/null; apk info -v expat 2>/dev/null
grep -l 'libexpat' /proc/[0-9]*/maps 2>/dev/null | cut -d/ -f3 | sort -un | xargs -r ps -o pid=,comm= -p
python3 -c 'import pyexpat; print(pyexpat.EXPAT_VERSION)' 2>/dev/null
# 2. the precondition: does the program let the document bring a DTD (it does unless it stops the parser on one)
# a binary that never references the doctype handler cannot be refusing DTDs through it
for b in /usr/bin/xmlwf /usr/sbin/your-daemon; do [ -x "$b" ] && printf '%s: %s\n' "$b" "$(objdump -T "$b" 2>/dev/null | grep -c XML_SetStartDoctypeDeclHandler)"; done
# 3. is a parsing process already spinning: CPU time against bytes read
ps -eo pid,etimes,time,comm --sort=-time | head -n 10Every installed libexpat is affected today, so the first block only tells you how many processes carry the exposure. The second is the one that narrows it: a program that installs a start-doctype handler and stops the parser from it does not accept the document’s DTD and cannot be made to pay for its declarations; most programs install no such handler. The third is the symptom: a parser that has read a few hundred kilobytes and consumed minutes of CPU is doing something quadratic, and this record and CVE-2026-137992 are two ways to get there with a DTD.
How to fix it
There is no release to install on 2 December 2026. When 2.12.0 is published and names this CVE, update the package and restart every process that had the old library mapped; the first block of the check lists them. Until then the choice is at the application: refuse DTDs where the format does not need them, and bound the CPU a parsing worker may spend.
# When the fixed release is packaged
apt update && apt install libexpat1 && systemctl restart <service> # Debian, Ubuntu
dnf update expat && systemctl restart <service> # RHEL family, Fedora
apk upgrade expat && rc-service <service> restart # Alpine
# then confirm nothing still maps the old copy
grep -l 'libexpat.*(deleted)' /proc/[0-9]*/maps 2>/dev/null | cut -d/ -f3# Until then: bound the worker rather than the input
# systemd: cap the CPU a parsing service may use and let it be restarted
systemctl set-property --runtime <service>.service CPUQuota=50%
# a one-shot parser under a shell: refuse to let one document run for minutes
ulimit -t 10; xmlwf untrusted.xmlRefusing the DTD is the mitigation that removes the input, and it is an application change: a start-doctype handler that calls XML_StopParser() turns any document with a <!DOCTYPE> into a parse error, which is right for formats that never use one and wrong for the ones that do. The CPU bound does not stop the attack, it stops one worker from carrying it indefinitely. What not to do: do not cherry-pick the pull request into a local build before it is merged; it was reworked once after review already, and the maintainer’s plan is to merge it under the CVE id, so the merged form is the one to carry. And do not read the 8.7 as more than it is: the record describes CPU time, not memory corruption, and a parser that is killed and restarted has lost nothing but the request.
Sources
- CVE-2026-141595 at CVE.org — the VulnCheck CNA record: the “scans valueless default attribute declarations for every start tag” description, both CVSS vectors, CWE-407, the affected range 0 to 2.11.0, and the references to pull request #1535 and the 2.11.0 source (2 December 2026, 01:08 UTC)
- Pull request #1535, “lib: Avoid per-tag scan over valueless default attributes” — Nurullah Özatak; opened 26 November, reopened with the rework 30 November, approved 1 December, milestone 2.12.0, open on 2 December 2026; commits
8c34d95(thevalueDefaultIndexwalk) and9f447ec(tests) · xmlparse.c at R_2_11_0, the loop the record cites · Changes at R_2_11_0, release 2.11.0 of 23 November 2026, which lists CVE-2026-124317, CVE-2026-128241 and CVE-2026-134703 and not this id - VulnCheck advisory — the CNA’s own page: High, libexpat through 2.11.0, CVSS 4.0 8.7, CWE-407, credit Nurullah Özatak, no fixed version stated (2 December 2026)
- NVD entry — no record on 2 December 2026 (the API returned zero results)
- Distribution trackers: Debian · Ubuntu · Red Hat · SUSE — none had an entry readable on 2 December 2026
- CISA KEV catalogue 2026.11.30, not listed · EPSS no score on 2 December 2026
Related reading
- CVE-2026-141596: libexpat resumes a parser suspended inside a CDATA section that came from an internal entity against the wrong buffer and dereferences a null pointer — the same day’s record from the same CNA, with its fix in the same unreleased milestone
- CVE-2026-137992: libexpat spends quadratic time on repeated attribute declarations — the previous DTD multiplier, fixed in 2.11.0
- CVE-2026-139881: libexpat falls back to a predictable hash salt after a short read of /dev/urandom — the other way to make expat’s lookups slow
- CVE-2026-134703: libexpat splits a UTF-16 surrogate pair and hands a lone high surrogate to the application — one of the three CVEs 2.11.0 did fix
- CVE-2026-137951: libexpat reads past a narrow string literal in a wide-character build with general entities off — what the same parser does with memory rather than time
- Life of a system call — where a CPU-bound worker shows up, and why a quota is not a fix
This advisory page was assembled from the primary sources listed above on 2 December 2026 and is updated when they change. The facts are theirs; the checks and the ordering are ours. If a row in the distribution table is out of date, the tracker link in that row is the current word.

