{"answers":{"affected":"4 open source packages ship an affected version, including github.com/gotenberg/gotenberg/v8 and github.com/gotenberg/gotenberg/v7. It affects 1 product.","exploited":"It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-42589 exists.","fix":"Upgrade to a fixed version.","what":"CVE-2026-42589 is a critical command injection vulnerability in gotenberg, published on 14 May 2026. An attacker can exploit it over the internet without logging in, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2026-42589 and fix it if it is affected.\n\nWhat it is: CVE-2026-42589 is a critical command injection vulnerability in gotenberg, published on 14 May 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.\nExploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-42589 exists.\n\nAffected packages and fixed versions:\n- github.com/gotenberg/gotenberg/v8 (Go): affected all versions; no fix listed\n- github.com/gotenberg/gotenberg/v8 (Go): affected all versions; no fix listed\n- github.com/gotenberg/gotenberg/v8 (Go): affected all versions; no fix listed\n- github.com/gotenberg/gotenberg/v7 (Go): affected all versions; no fix listed\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2026-42589/ (Markdown: https://insights.sbomify.com/CVE-2026-42589/index.md)","id":"CVE-2026-42589","markdown":"https://insights.sbomify.com/CVE-2026-42589/index.md","name":"CVE-2026-42589","record":{"aliases":["GHSA-rqgh-gxv4-6657","GO-2026-5636"],"analysis":{"component_type":"server_software","fix_type":"upgrade","impacts":["code_execution"],"network_reachable":"yes","non_default_config":false,"product_category":"PDF generation API","requires_auth":"none","summary":"Unauthenticated attackers can execute arbitrary OS commands via ExifTool flag injection in the metadata write endpoint.","user_interaction":"not_required","vuln_class":"command_injection"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"gotenberg","vendor":"thecodingmachine"}],"cvss":{"score":9.8,"severity":"critical","source":"cna","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","version":"3.1"},"cwes":[{"id":"CWE-78","name":"Improper Neutralization of Special Elements used in an OS Command"}],"description":"Gotenberg is a Docker-powered stateless API for PDF files. Prior to 8.31.0, Gotenberg's /forms/pdfengines/metadata/write HTTP endpoint accepts a JSON metadata object and passes its keys directly to ExifTool via the go-exiftool library. No validation is performed on key characters. A \\n embedded in a JSON key splits the ExifTool stdin stream into a new argument line, allowing an attacker to inject arbitrary ExifTool flags — including -if, which evaluates Perl expressions. This achieves unauthenticated OS command execution in a single HTTP request. The response is HTTP 200 with a valid PDF, making the attack transparent to basic monitoring. This vulnerability is fixed in 8.31.0.","ecosystems":["Go"],"exploits":{"exploitdb":0,"first_seen":"2026-05-30","github_poc":3,"max_poc_stars":3,"metasploit":0,"nuclei":1,"refs":[{"date":"2026-05-30T06:54:17Z","kind":"github_poc","ref":"https://github.com/fineman999/POC_CVE-2026-42589","stars":3,"title":"POC_CVE-2026-42589"},{"date":"2026-10-03T21:40:17Z","kind":"github_poc","ref":"https://github.com/HackfutSecRoot/-GOTENBERG-RCE-CHAIN","stars":2,"title":"Gotenberg RCE Chain — CVE-2026-42589 + CVE-2026-40281"},{"date":"2026-10-02T14:03:41Z","kind":"github_poc","ref":"https://github.com/codeb0ssx/CVE-2026-42589xCVE-2026-40281-PoC","stars":0,"title":"CVE-2026-42589 \u0026 CVE-2026-40281 - GotenBerg"},{"date":null,"kind":"nuclei","ref":"http/cves/2026/CVE-2026-42589.yaml","stars":null,"title":"Gotenberg - Command Injection"}],"tier":"weaponised"},"has_fix":true,"headline":"Gotenberg: Unauthenticated RCE via ExifTool Metadata Key Injection","id":"CVE-2026-42589","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"Go","product":null,"products":[],"type":"command_injection","year":"2026"},"n_packages":4,"n_references":1,"next":{"headline":"Gotenberg: ExifTool group-prefix syntax bypasses dangerous-tag blocklist","id":"CVE-2026-42590"},"packages":[{"ecosystem":"Go","fixed":[],"introduced":["0"],"last_affected":[],"package":"github.com/gotenberg/gotenberg/v7","purl":"pkg:golang/github.com/gotenberg/gotenberg/v7","source":"GO-2026-5636"},{"ecosystem":"Go","fixed":[],"introduced":[],"last_affected":[],"package":"github.com/gotenberg/gotenberg/v8","purl":null,"source":"GHSA-rqgh-gxv4-6657"},{"ecosystem":"Go","fixed":[],"introduced":[],"last_affected":[],"package":"github.com/gotenberg/gotenberg/v8","purl":"pkg:golang/github.com/gotenberg/gotenberg/v8","source":"GHSA-rqgh-gxv4-6657"},{"ecosystem":"Go","fixed":[],"introduced":["0"],"last_affected":[],"package":"github.com/gotenberg/gotenberg/v8","purl":"pkg:golang/github.com/gotenberg/gotenberg/v8","source":"GO-2026-5636"}],"prev":{"headline":"Apache ActiveMQ Broker, Apache ActiveMQ All, Apache ActiveMQ: Remote Code Execution via Jolokia addNetworkConnector","id":"CVE-2026-42588"},"products":["gotenberg"],"published":"2026-05-14","related":[{"cvss_score":10,"headline":"Gotenberg vulnerable to argument injection via newlines in ExifTool metadata values","id":"CVE-2026-40281","kev_date_added":null,"published":"2026-05-06"},{"cvss_score":9.8,"headline":"Path traversal in n/a","id":"CVE-2020-13450","kev_date_added":null,"published":"2021-01-07"},{"cvss_score":9.8,"headline":"Code injection in n/a","id":"CVE-2020-13451","kev_date_added":null,"published":"2021-01-07"},{"cvss_score":9.8,"headline":"Privilege escalation in n/a","id":"CVE-2020-13452","kev_date_added":null,"published":"2021-01-07"},{"cvss_score":9.4,"headline":"Gotenberg: Unauthenticated SSRF via default deny-list bypass in downloadFrom and webhook","id":"CVE-2026-42596","kev_date_added":null,"published":"2026-05-14"},{"cvss_score":8.7,"headline":"Gotenberg has a ReDoS via extraHttpHeaders scope feature","id":"CVE-2026-35458","kev_date_added":null,"published":"2026-04-07"}],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"CC BY 4.0","name":"Go Vulnerability Database","prefix":"GO"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"},{"class":"attribution","licence":"MIT","name":"Nuclei templates"},{"class":"open","licence":"CC0","name":"PoC-in-GitHub"}],"ssvc":{"automatable":"yes","exploitation":"poc","technical_impact":"total"},"state":"PUBLISHED","updated":"2026-05-14","vendors":["gotenberg"]},"summary":"Unauthenticated attackers can execute arbitrary OS commands via ExifTool flag injection in the metadata write endpoint.","url":"https://insights.sbomify.com/CVE-2026-42589/"}