{"id":"CVE-2026-114609","aliases":["CVE-2026-114609","GHSA-rw7v-4hrq-x6r9"],"related":[],"kind":"vulnerability","state":"published","title":"fpdf2 implicitly loads external URLs and local image paths when rendering attacker-controlled content","summary":"fpdf2 is a PDF creation library for Python. Prior to 2.8.8, fpdf2's shared image loader automatically dereferences attacker-controlled HTTP(S) URLs and raw local paths supplied through FPDF.image(), FPDF.write_html() HTML <img src> values, SVG <image href> or xlink:href values, and template image fields. This can cause outbound requests to attacker-selected internal or external services and local file open attempts, although local content is exposed only when it is a valid supported image or SVG resource. file:// URLs are not specially handled, so the local-path case requires a raw filesystem path. This issue is fixed in version 2.8.8.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"fpdf2 is a PDF creation library for Python. Prior to 2.8.8, fpdf2's shared image loader automatically dereferences attacker-controlled HTTP(S) URLs and raw local paths supplied through FPDF.image(), FPDF.write_html() HTML <img src> values, SVG <image href> or xlink:href values, and template image fields. This can cause outbound requests to attacker-selected internal or external services and local file open attempts, although local content is exposed only when it is a valid supported image or SVG resource. file:// URLs are not specially handled, so the local-path case requires a raw filesystem path. This issue is fixed in version 2.8.8.","source":"cvelist"},{"lang":"en","text":"## 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 `<img src=\"...\">`\n* `FPDF.image()` when rendering SVG files containing `<image href=\"...\">` or `xlink:href=\"...\">`\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 `<image>` 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('<img src=\"http://127.0.0.1:8000/internal.png\">')\n```\n\nSVG:\n```xml\n<image href=\"http://169.254.169.254/latest/meta-data/\" />\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 <img> handling\n- @BudongJW for identifying SVG <image> 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","format":"markdown","source":"ghsa"}],"published":"2026-10-22T17:18:22.802Z","modified":"2026-10-29T04:18:24.410Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:N/A:N","score":5.8,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:N/A:N","score":5.8,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:N/A:N","score":5.8,"rating":"MEDIUM"}],"cwes":["CWE-918"],"affected":[{"ranges":[{"version":"< 2.8.8","status":"affected"}],"vendor":"py-pdf","product":"fpdf2","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"2.8.8"}],"ecosystem":"PyPI","package":"fpdf2","purl":"pkg:pypi/fpdf2","source":"ghsa"}],"references":[{"url":"https://github.com/py-pdf/fpdf2/security/advisories/GHSA-rw7v-4hrq-x6r9","tags":["web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/py-pdf/fpdf2/pull/1824","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/py-pdf/fpdf2/pull/1857","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/py-pdf/fpdf2/commit/0d27190a8c907e02ebe9cd881471a14d0622b432","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/py-pdf/fpdf2/commit/6e23f610b7946e96e9a5dd0535dcbfbe7ac1397d","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/py-pdf/fpdf2/releases/tag/2.8.8","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-114609","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/py-pdf/fpdf2","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"yes","technicalImpact":"partial","date":"2026-10-29T02:19:48.605Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-114609","url":"https://www.cve.org/CVERecord?id=CVE-2026-114609","licence":"CVE Terms of Use","modified":"2026-10-29T02:19:57.646Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-rw7v-4hrq-x6r9","url":"https://github.com/advisories/GHSA-rw7v-4hrq-x6r9","licence":"CC-BY-4.0","modified":"2026-10-27T15:00:04.995Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-114609","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-114609","licence":"Public domain","modified":"2026-10-29T04:18:24.410Z"}],"updatedAt":"2026-11-25T22:59:46.796Z","epss":{"score":0.00332,"percentile":0.28418,"date":"2026-12-01T12:00:22.000Z"}}