{
  "id": "security/python/docling-project__docling/2026-11-13-mets-gbs-image-resize-memory-exhaustion",
  "title": "METS-GBS backend resizes page images to the size declared in the OCR data without a pixel limit",
  "category": "security",
  "type": "dos",
  "severity": "medium",
  "cvss": {
    "vector": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H",
    "score": 6.5
  },
  "ecosystem": "python",
  "project": {
    "owner": "docling-project",
    "repo": "docling",
    "url": "https://github.com/docling-project/docling"
  },
  "affected_versions": [
    "docling (pip) >= 2.45.0, < 2.151.1",
    "docling-slim (pip) >= 2.92.0, < 2.151.1"
  ],
  "fixed_version": "2.151.1",
  "status": "published",
  "disclosure": {
    "channel": "pvr",
    "ghsa_id": "GHSA-g38r-q9hq-84mq",
    "cve_id": null,
    "url": "https://github.com/docling-project/docling/security/advisories/GHSA-g38r-q9hq-84mq",
    "reported_at": "2026-11-13T17:11:56+03:00",
    "published_at": "2026-11-19T18:44:30+03:00",
    "accepted_at": null
  },
  "summary": "The METS-GBS backend takes the page size from the hOCR page bbox and resizes the page image to that size with no upper limit (CWE-400, CWE-770). A METS-GBS archive of less than 200 KB that declares a very large page can make conversion allocate gigabytes of memory. The max_image_pixels limit added in 2.142.1 is not used by this backend, and METS-GBS is enabled in the default converter. This is a denial of service for an application that converts untrusted METS-GBS archives; confidentiality and integrity are not affected. Affected versions are docling >= 2.45.0, < 2.151.1 and docling-slim >= 2.92.0, < 2.151.1. Fixed by the maintainers in 2.151.1: the backend checks the page image size and the declared page size against max_image_pixels before it resizes, and skips a page over the limit.",
  "discovered_at": "2026-11-13T17:11:56+03:00",
  "public": true,
  "credit": "ucsurf",
  "updated_at": "2026-11-19T19:30:00+03:00",
  "pr": null,
  "references": [
    "https://github.com/docling-project/docling/pull/5484"
  ]
}
