---
id: CVE-2026-40260
aliases:
  - GHSA-3crg-w4f6-42mx
  - PYSEC-2026-3006
title: 'pypdf: Manipulated XMP metadata entity declarations can exhaust RAM'
summary: 'pypdf: Manipulated XMP metadata entity declarations can exhaust RAM'
severity: medium
cvss: 5.3
cvssVector: 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L'
vendor: pypdf
product: pypdf
ecosystem: pip
affected:
  - pypdf < 6.10.0
patched:
  - pypdf 6.10.0
published: '2026-04-10'
updated: '2026-09-10'
sourceUpdated: '2026-09-10T03:50:42.398553260Z'
source: OSV
sourceUrl: 'https://osv.dev/vulnerability/GHSA-3crg-w4f6-42mx'
references:
  - url: 'https://github.com/py-pdf/pypdf/security/advisories/GHSA-3crg-w4f6-42mx'
  - url: 'https://nvd.nist.gov/vuln/detail/CVE-2026-40260'
  - url: 'https://github.com/py-pdf/pypdf/pull/3724'
  - url: >-
      https://github.com/py-pdf/pypdf/commit/b15a374e5ca648d4878e57c3b2c0551e7f8cc7f8
  - url: 'https://github.com/py-pdf/pypdf'
  - url: 'https://github.com/py-pdf/pypdf/releases/tag/6.10.0'
tags:
  - osv
  - pip
epss: 0.00423
epssPercentile: 0.3625
ingestedAt: '2026-07-13T18:57:51.859Z'
---

## Overview

### Impact

An attacker who uses this vulnerability can craft a PDF which leads to large memory usage. This requires parsing the XMP metadata.

### Patches
This has been fixed in [pypdf==6.10.0](https://github.com/py-pdf/pypdf/releases/tag/6.10.0).

### Workarounds
If you cannot upgrade yet, consider applying the changes from PR [#3724](https://github.com/py-pdf/pypdf/pull/3724).

## Affected packages

- `pypdf < 6.10.0`

## Remediation

Upgrade to a patched release:

- `pypdf 6.10.0`
