{"id":"CVE-2026-105747","aliases":["CVE-2026-105747","GHSA-3cr3-8m4c-fpxw","PYSEC-2026-4194","PYSEC-2026-4209"],"related":[],"kind":"vulnerability","state":"published","title":"Docling: METS-GBS archive member limit enforced after full member enumeration (memory exhaustion during format detection)","summary":"Docling simplifies document processing by parsing diverse formats and providing integrations with the generative AI ecosystem. From 2.45.0 until 2.131.0, METS-GBS format detection in docling/datamodel/document.py and the backend in docling/backend/mets_gbs_backend.py call tarfile.TarFile.getmembers() before enforcing the max_member_count limit, causing the full archive member list to be allocated before the limit can stop processing. A small gzip-compressed tar archive with a very large number of empty members can therefore consume memory proportional to the declared member count, including during format detection before the allowed_formats restriction is applied. This issue is a residual weakness in the member-count protection added for CVE-2026-44018. This issue is fixed in 2.131.0.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Docling simplifies document processing by parsing diverse formats and providing integrations with the generative AI ecosystem. From 2.45.0 until 2.131.0, METS-GBS format detection in docling/datamodel/document.py and the backend in docling/backend/mets_gbs_backend.py call tarfile.TarFile.getmembers() before enforcing the max_member_count limit, causing the full archive member list to be allocated before the limit can stop processing. A small gzip-compressed tar archive with a very large number of empty members can therefore consume memory proportional to the declared member count, including during format detection before the allowed_formats restriction is applied. This issue is a residual weakness in the member-count protection added for CVE-2026-44018. This issue is fixed in 2.131.0.","source":"cvelist"},{"lang":"en","text":"### Summary\n\nWhen docling detects the input format of a gzip-compressed tar archive (METS-GBS), and later when the METS-GBS backend opens it, it calls `tarfile.TarFile.getmembers()`. That builds the full member list in memory before the `max_member_count` limit is checked. A small archive with a very large number of empty members therefore makes docling allocate memory in proportion to the member count, and the limit has no effect.\n\n### Details\n\n`docling/datamodel/document.py` (format detection) and `docling/backend/mets_gbs_backend.py` both iterate `tar.getmembers()` and count members inside the loop. `getmembers()` reads every header up front.\n\nMeasured on Python 3.12: an archive of 1,000,000 empty members compresses to about 6.2 MB and makes `getmembers()` hold about 408 MB (about 66 times the input size). Format detection runs for any `application/gzip` input before `allowed_formats` is applied, so the allocation happens even when METS-GBS is not an allowed format.\n\nThis check was introduced by the fix for CVE-2026-44018 (GHSA-r3xg-rg9j-67fv) in 2.91.0. The eager enumeration it relies on has been there since METS-GBS detection was added in 2.45.0.\n\n### Impact\n\nMemory exhaustion of the converting process, proportional to the size of the input archive. Confidentiality and integrity are not affected.\n\n### Patches\n\nFixed in docling 2.131.0 by [#4412](https://github.com/docling-project/docling/pull/4412). Format detection and the METS-GBS backend now read archive members one at a time and stop as soon as `max_member_count` is exceeded, including when looking up page files.\n\n### Workarounds\n\nUpgrade to 2.131.0. For older versions:\n\nReject gzip or tar inputs before they reach docling when METS-GBS support is not needed, and run conversions of untrusted input with memory limits.","format":"markdown","source":"ghsa"}],"published":"2026-10-05T21:32:34.438Z","modified":"2026-10-15T14:56:00.401Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:L","score":4.3,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:L","score":4.3,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:L","score":4.3,"rating":"MEDIUM"},{"scorer":"PyPA Advisory Database","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:L","score":4.3,"rating":"MEDIUM"}],"cwes":["CWE-409","CWE-770"],"affected":[{"ranges":[{"version":">= 2.45.0, < 2.131.0","status":"affected"}],"vendor":"docling-project","product":"docling","source":"cvelist"},{"ranges":[{"version":">= 2.45.0, < 2.131.0","status":"affected"}],"vendor":"docling-project","product":"docling-slim","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"2.45.0","status":"affected","fixed":"2.131.0"}],"ecosystem":"PyPI","package":"docling","purl":"pkg:pypi/docling","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"2.92.0","status":"affected","fixed":"2.131.0"}],"ecosystem":"PyPI","package":"docling-slim","purl":"pkg:pypi/docling-slim","source":"ghsa"},{"ranges":[{"status":"affected","introduced":"2.45.0","fixed":"2.131.0"}],"vendor":"docling","product":"docling","cpe":"cpe:2.3:a:docling:docling:*:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"type":"ecosystem","introduced":"2.45.0","status":"affected","fixed":"2.131.0"}],"ecosystem":"PyPI","package":"docling","purl":"pkg:pypi/docling","source":"pysec"},{"ranges":[{"type":"ecosystem","introduced":"2.92.0","status":"affected","fixed":"2.131.0"}],"ecosystem":"PyPI","package":"docling-slim","purl":"pkg:pypi/docling-slim","source":"pysec"}],"references":[{"url":"https://github.com/docling-project/docling/security/advisories/GHSA-3cr3-8m4c-fpxw","tags":["fix","patch","vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://github.com/docling-project/docling/pull/4412","tags":["fix","issue-tracking","patch","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://github.com/docling-project/docling/commit/ebae65cd71c37c88b36185b406a449b92d8f7ffa","tags":["fix","patch","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://github.com/docling-project/docling/releases/tag/v2.131.0","tags":["advisory","release-notes","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-105747","tags":["advisory"],"sources":["ghsa","pysec"]},{"url":"https://github.com/docling-project/docling","tags":["package"],"sources":["ghsa","pysec"]},{"url":"https://pypi.org/project/docling-slim","tags":["package"],"sources":["pysec"]},{"url":"https://github.com/advisories/GHSA-3cr3-8m4c-fpxw","tags":["advisory"],"sources":["pysec"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2026-10-06T14:34:13.770Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-105747","url":"https://www.cve.org/CVERecord?id=CVE-2026-105747","licence":"CVE Terms of Use","modified":"2026-10-06T14:48:33.056Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-3cr3-8m4c-fpxw","url":"https://github.com/advisories/GHSA-3cr3-8m4c-fpxw","licence":"CC-BY-4.0","modified":"2026-10-15T14:56:00.401Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-105747","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-105747","licence":"Public domain","modified":"2026-10-07T18:54:39.350Z"},{"source":"pysec","name":"PyPA Advisory Database","id":"PYSEC-2026-4194","url":"https://osv.dev/vulnerability/PYSEC-2026-4194","licence":"CC-BY-4.0","modified":"2026-10-15T14:56:00.401Z"},{"source":"pysec","name":"PyPA Advisory Database","id":"PYSEC-2026-4209","url":"https://osv.dev/vulnerability/PYSEC-2026-4209","licence":"CC-BY-4.0","modified":"2026-10-15T14:56:00.401Z"}],"updatedAt":"2026-11-25T22:59:42.187Z","epss":{"score":0.00299,"percentile":0.24312,"date":"2026-12-01T12:00:22.000Z"}}