KEVWire

Security intelligence, with context.

Response snapshot Oct 27, 2026, 16:01 UTC

Back to the wire
Permalink
VulnerabilityCVE-2026-114610

fpdf2: Exponential SVG '<use>' expansion causes CPU and memory exhaustion in 'FPDF.image()'

fpdf2 expands SVG ` ` references by deep-copying the complete referenced graphics tree. A small SVG can use nested references to make the number of in-memory objects grow exponentially, causing excessive CPU and memory consumption during `FPDF.image()` processing.

At a glance

Exploited
Not known
Severity
6.5 Medium (CVSS 3.1)
Chance of exploitation
Not estimated
Sources
1 source

What to do

GitHub lists first patched versions: fpdf2: 2.8.8. Confirm the affected range and upgrade guidance in the exact advisory.

Read GitHub-reviewed advisory GHSA-wqw6-wpr3-45rh (opens a new tab)

What happened

### Summary

fpdf2 expands SVG ` ` references by deep-copying the complete referenced graphics tree. A small SVG can use nested references to make the number of in-memory objects grow exponentially, causing excessive CPU and memory consumption during `FPDF.image()` processing.

This was reproduced with an 895-byte SVG on fpdf2 2.8.7. Under a 128 MB process limit, the input kept the process busy for about 14 seconds before raising `MemoryError`.

### Details

Continue reading

The issue is in fpdf2's own SVG reference handling. It does not rely on XML entities, external URLs, local files, or vulnerable behavior in another dependency.

When fpdf2 resolves an SVG reference, [`SVGObject.build_xref()`](https://github.com/py-pdf/fpdf2/blob/a3307f96a0d165831029b3fb644aee5a7ca03328/fpdf/svg.py#L1584) passes the referenced object to `GraphicsContext.add_item()`:

```python pdf_group.add_item(self.cross_references[ref]) ```

[`GraphicsContext.add_item()`](https://github.com/py-pdf/fpdf2/blob/a3307f96a0d165831029b3fb644aee5a7ca03328/fpdf/drawing.py#L3618-L3633) uses `clone=True` by default and deep-copies the object:

```python def add_item(self, item, clone=True): if clone: item = deepcopy(item) self.path_items.append(item) ```

An attacker can define `g1` as eight references to `g0`, `g2` as eight references to `g1`, and so on. Each level adds only a small amount of XML, but fpdf2 copies the entire tree from the previous level eight times. The resulting work grows approximately as `8^n`.

`ResourceAccessPolicy` does not prevent this behavior because the SVG contains only inline objects and does not request any external resource. The same failure was reproduced on development commit `a3307f96a0d165831029b3fb644aee5a7ca03328` with `ResourceAccessPolicy.NONE`.

### PoC

This was tested on Linux with Python 3.13.5. The script applies a 128 MB address-space limit so the process fails safely instead of consuming all available system memory.

```python import resource import time

from fpdf import FPDF

groups = [' '] for level in range(1, 6): uses = f' ' * 8 groups.append(f' {uses} ')

svg = ( ' ' ' ' + "".join(groups) + ' ' ).encode()

pdf = FPDF() pdf.add_page()

limit = 128 * 1024 * 1024 resource.setrlimit(resource.RLIMIT_AS, (limit, limit))

print(f"payload size: {len(svg)} bytes") started = time.perf_counter()

try: pdf.image(svg, w=10) except MemoryError: elapsed = time.perf_counter() - started max_rss = resource.getrusage(resource.RUSAGE_SELF).ru_maxrss print(f"MemoryError after {elapsed:.3f}s, max RSS: {max_rss} KiB") ```

```text payload size: 895 bytes MemoryError after 14.336s, max RSS: 115596 KiB ```

Execution time varies by machine, but the process should show heavy resource use and fail at the configured memory limit.

### Impact

This is an uncontrolled resource consumption vulnerability affecting applications that pass user-controlled SVG data to `FPDF.image()`. A single crafted image can occupy a PDF generation worker for several seconds and then make the current job fail with `MemoryError`. Submitting the same input concurrently repeats the CPU and memory cost across the available workers, reducing or exhausting the service's PDF generation capacity.

The payload is less than 1 KB and requires no external resource access, XML entities, special network configuration, or permissive fpdf2 settings.

Affected package ranges reported by GitHub: fpdf2: >= 2.5.0, < 2.8.8

Scores and how they were measured

CVSS base severity

6.5

Version 3.1As of

CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H

Measurement source (opens a new tab)

How bad it is if exploited. Not a prediction of exploitation or proof you are exposed.

EPSS probability

Not available

A model's estimate of exploitation in the next 30 days, not certainty or your own risk.

Related technology

Sources

  1. Primary source

    GitHub-reviewed advisory GHSA-wqw6-wpr3-45rh (opens a new tab)

    The public advisory supplies the description, affected package/version ranges, and any listed CVSS metric. GitHub review is not local review.

    Published Checked

  2. Primary source

    GitHub public advisory API page (opens a new tab)

    The API page supplied GHSA-wqw6-wpr3-45rh, its actual identifiers, source dates, and structured metrics.

    Published Date not suppliedChecked

Cite this record

For factual claims, cite the primary sources above; cite KEVWire for its compilation, dates, and classifications.

APA

KEVWire. (2026, October 27). fpdf2: Exponential SVG '<use>' expansion causes CPU and memory exhaustion in 'FPDF.image()' (CVE-2026-114610). https://kevwire.com/record/CVE-2026-114610

MLA

"fpdf2: Exponential SVG '<use>' expansion causes CPU and memory exhaustion in 'FPDF.image()' (CVE-2026-114610)." KEVWire, 27 Oct. 2026, kevwire.com/record/CVE-2026-114610.

Chicago

KEVWire. "fpdf2: Exponential SVG '<use>' expansion causes CPU and memory exhaustion in 'FPDF.image()' (CVE-2026-114610)." Last modified October 27, 2026. https://kevwire.com/record/CVE-2026-114610.

Evidence summary (plain text)

fpdf2: Exponential SVG '<use>' expansion causes CPU and memory exhaustion in 'FPDF.image()' (Oct 27, 2026).
fpdf2 expands SVG ` ` references by deep-copying the complete referenced graphics tree. A small SVG can use nested references to make the number of in-memory objects grow exponentially, causing excessive CPU and memory consumption during `FPDF.image()` processing.

This was reproduced with an 895-byte SVG on fpdf2 2.8.7. Under a 128 MB process limit, the input kept the process busy for about 14 seconds before raising `MemoryError`.
CVSS 6.5 (version 3.1; evidence as of Oct 27, 2026; https://github.com/advisories/GHSA-wqw6-wpr3-45rh).
Sources:
GitHub-reviewed advisory GHSA-wqw6-wpr3-45rh: https://github.com/advisories/GHSA-wqw6-wpr3-45rh
GitHub public advisory API page: https://api.github.com/advisories?type=reviewed&per_page=100&sort=updated&direction=desc
Record ID: CVE-2026-114610.
Record origin: Ingested record.
AI evidence: Not assessed.
Known exploitation: Not assessed.
Zero-day status: Not assessed. KEV membership alone does not establish zero-day status.
About this data

This record was ingested from a data source. Retrieved: Oct 27, 2026, 16:00 UTC. Ingestion is not an independent editorial investigation.

A CISA KEV listing documents known exploitation, not necessarily a zero-day; absence from the catalog does not prove a vulnerability has never been exploited.

Technology tags indicate possible relevance, not verified exposure. Confirm the affected product, version, and configuration against your own inventory; KEVWire does not scan your systems.

A personal reading checklist on this device, not verified remediation.

Record JSON

Your account

Email alerts

Email alerts are not available yet. To follow your stack today, use its RSS feed, which honors your filters, or connect an AI agent through the API.

Suggest an improvement

Ideas, missing sources, corrections, and bugs are all welcome. No account needed. Suggestions are reviewed by a person before anything changes.

Record details

Record detail