BREW-OCRMYPDF-CVE-2026-114609 (GHSA-RW7V-4HRQ-X6R9)
Vulnerability from osv_homebrew – Published: 2026-10-28 08:53 – Updated: 2026-11-10 09:09 – Source websiteSummary
fpdf2 implicitly dereferences image resource references supplied to rendering APIs. If an application passes untrusted HTML, SVG, template data, or image paths into those APIs, fpdf2 may issue outbound HTTP(S) requests or attempt to open local filesystem paths.
This behavior is relevant in applications that render untrusted or user-provided input without sanitizing or restricting embedded resource references.
Description
In affected versions, fpdf2 uses a shared internal image-loading mechanism for multiple features. This loader:
- fetches
http://andhttps://URLs over the network - opens other string values as local filesystem paths
During document processing, resource references embedded in input content are automatically dereferenced using this mechanism.
This behavior is reachable through:
FPDF.image()FPDF.write_html()via HTML<img src="...">FPDF.image()when rendering SVG files containing<image href="...">orxlink:href="...">- template image elements that forward values into
FPDF.image()
If an application renders attacker-controlled input through these APIs, that input can cause:
- outbound HTTP(S) requests to attacker-chosen destinations
- local file open attempts for attacker-chosen paths
This may enable Server-Side Request Forgery (SSRF) in applications that render untrusted content.
Local file access impact is limited: the library attempts to open the referenced path, but successful embedding depends on the target being a valid and supported image or SVG resource.
file:// URLs are not specially handled; raw filesystem paths such as /path/to/file or ../../file.png are the relevant local-path cases.
Impact
This issue affects applications that render untrusted or partially trusted content using fpdf2.
Applications may be impacted if they:
- pass untrusted HTML into
write_html() - render untrusted SVG with embedded
<image>references - pass user-controlled strings into
image() - allow untrusted template definitions or template field values to control image paths
Potential impacts include:
- outbound requests to internal or external network services
- limited local file access attempts depending on file type and parsing success (limited to content that fpdf2 recognizes as a supported image or SVG resource)
The severity depends on how fpdf2 is integrated and whether untrusted input is allowed to control resource references.
Example scenarios
HTML:
pdf.write_html('<img src="http://127.0.0.1:8000/internal.png">')
SVG:
<image href="http://169.254.169.254/latest/meta-data/" />
Direct image path:
pdf.image("../../.env")
Workarounds
Applications can mitigate this by:
- not rendering untrusted HTML, SVG, or template content
- rejecting user-controlled
src/href/ image-path values - mapping resources through an application-defined allowlist
- converting user-supplied images to trusted in-memory objects before passing them to
fpdf2
Credits
- @kule500 for identifying SSRF via HTML
handling
- @BudongJW for identifying SVG resource loading as an additional vector
- @redyank for analysis of the shared image loading mechanism
- @manop55555 for identifying a DNS rebinding bypass in the initial REMOTE_PUBLIC implementation
{
"affected": [
{
"ecosystem_specific": {
"fix": "bump",
"range_state": "fixed",
"resource": "fpdf2",
"resource_purl": "pkg:pypi/fpdf2@2.9.0",
"upstream_fixed_in": "2.8.8"
},
"package": {
"ecosystem": "Homebrew",
"name": "ocrmypdf",
"purl": "pkg:brew/ocrmypdf"
},
"ranges": [
{
"events": [
{
"introduced": "17.0.0"
},
{
"fixed": "17.11.0"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"database_specific": {
"confidence": "high",
"source": "matched",
"strategy": "registry",
"upstream_evidence": [
{
"ecosystem": "PyPI",
"key": "pkg:pypi/fpdf2@2.9.0",
"name": "fpdf2",
"resource": "fpdf2",
"strategy": "registry",
"subject_version": "2.9.0"
}
]
},
"details": "## Summary\n\n`fpdf2` implicitly dereferences image resource references supplied to rendering APIs. If an application passes untrusted HTML, SVG, template data, or image paths into those APIs, `fpdf2` may issue outbound HTTP(S) requests or attempt to open local filesystem paths.\n\nThis behavior is relevant in applications that render untrusted or user-provided input without sanitizing or restricting embedded resource references.\n\n## Description\n\nIn affected versions, `fpdf2` uses a shared internal image-loading mechanism for multiple features. This loader:\n\n* fetches `http://` and `https://` URLs over the network\n* opens other string values as local filesystem paths\n\nDuring document processing, resource references embedded in input content are automatically dereferenced using this mechanism.\n\nThis behavior is reachable through:\n\n* `FPDF.image()`\n* `FPDF.write_html()` via HTML `\u003cimg src=\"...\"\u003e`\n* `FPDF.image()` when rendering SVG files containing `\u003cimage href=\"...\"\u003e` or `xlink:href=\"...\"\u003e`\n* template image elements that forward values into `FPDF.image()`\n\nIf an application renders attacker-controlled input through these APIs, that input can cause:\n\n* outbound HTTP(S) requests to attacker-chosen destinations\n* local file open attempts for attacker-chosen paths\n\nThis may enable Server-Side Request Forgery (SSRF) in applications that render untrusted content.\n\nLocal file access impact is limited: the library attempts to open the referenced path, but successful embedding depends on the target being a valid and supported image or SVG resource.\n\n`file://` URLs are not specially handled; raw filesystem paths such as `/path/to/file` or `../../file.png` are the relevant local-path cases.\n\n## Impact\n\nThis issue affects applications that render untrusted or partially trusted content using `fpdf2`.\n\nApplications may be impacted if they:\n\n* pass untrusted HTML into `write_html()`\n* render untrusted SVG with embedded `\u003cimage\u003e` references\n* pass user-controlled strings into `image()`\n* allow untrusted template definitions or template field values to control image paths\n\nPotential impacts include:\n\n* outbound requests to internal or external network services\n* limited local file access attempts depending on file type and parsing success (limited to content that fpdf2 recognizes as a supported image or SVG resource)\n\nThe severity depends on how `fpdf2` is integrated and whether untrusted input is allowed to control resource references.\n\n**Example scenarios**\n\nHTML:\n```python\npdf.write_html(\u0027\u003cimg src=\"http://127.0.0.1:8000/internal.png\"\u003e\u0027)\n```\n\nSVG:\n```xml\n\u003cimage href=\"http://169.254.169.254/latest/meta-data/\" /\u003e\n```\n\nDirect image path:\n```python\npdf.image(\"../../.env\")\n```\n\n**Workarounds**\n\nApplications can mitigate this by:\n\n- not rendering untrusted HTML, SVG, or template content\n- rejecting user-controlled `src` / `href` / image-path values\n- mapping resources through an application-defined allowlist\n- converting user-supplied images to trusted in-memory objects before passing them to `fpdf2`\n\n**Credits**\n\n- @kule500 for identifying SSRF via HTML \u003cimg\u003e handling\n- @BudongJW for identifying SVG \u003cimage\u003e resource loading as an additional vector\n- @redyank for analysis of the shared image loading mechanism\n- @manop55555 for identifying a DNS rebinding bypass in the initial REMOTE_PUBLIC implementation",
"id": "BREW-ocrmypdf-CVE-2026-114609",
"modified": "2026-11-10T09:09:35Z",
"published": "2026-10-28T08:53:18Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/py-pdf/fpdf2/security/advisories/GHSA-rw7v-4hrq-x6r9"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-114609"
},
{
"type": "WEB",
"url": "https://github.com/py-pdf/fpdf2/pull/1824"
},
{
"type": "WEB",
"url": "https://github.com/py-pdf/fpdf2/pull/1857"
},
{
"type": "WEB",
"url": "https://github.com/py-pdf/fpdf2/commit/0d27190a8c907e02ebe9cd881471a14d0622b432"
},
{
"type": "WEB",
"url": "https://github.com/py-pdf/fpdf2/commit/6e23f610b7946e96e9a5dd0535dcbfbe7ac1397d"
},
{
"type": "PACKAGE",
"url": "https://github.com/py-pdf/fpdf2"
},
{
"type": "WEB",
"url": "https://github.com/py-pdf/fpdf2/releases/tag/2.8.8"
}
],
"schema_version": "1.7.3",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:N/A:N",
"type": "CVSS_V3"
}
],
"summary": "fpdf2 implicitly loads external URLs and local image paths when rendering attacker-controlled content",
"upstream": [
"GHSA-rw7v-4hrq-x6r9",
"CVE-2026-114609"
]
}
Sightings
| Author | Source | Type | Date | Other |
|---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or observed by the user.
- Confirmed: The vulnerability has been validated from an analyst's perspective.
- Published Proof of Concept: A public proof of concept is available for this vulnerability.
- Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
- Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
- Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
- Not confirmed: The user expressed doubt about the validity of the vulnerability.
- Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.
The approach is described in our paper Mapping CVEs to MITRE ATT&CK Techniques: A Curated Gold-Set Classifier and the Limits of LLM-Assisted Label Expansion.
Browse all ATT&CK techniques and the vulnerabilities related to each.
Related by attack behaviour
Vulnerabilities whose description is nearest to this one in the vector space of the CIRCL/vulnerability-attack-technique-biencoder model. This is a similarity search over the bi-encoder space (plain cosine), not a classification, and it has no measured accuracy.