{"answers":{"affected":"4 open source packages ship an affected version, including phpoffice/phpexcel and phpoffice/phpspreadsheet. It affects 1 product.","exploited":"There is no known exploitation of CVE-2019-12331 in the wild and no public exploit code.","fix":"Upgrade to a fixed version.","what":"CVE-2019-12331 is a high-severity vulnerability in n/a, published on 7 Nov 2019. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link."},"fix_prompt":"Check this codebase for CVE-2019-12331 and fix it if it is affected.\n\nWhat it is: CVE-2019-12331 is a high-severity vulnerability in n/a, published on 7 Nov 2019. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.\nExploitation: There is no known exploitation of CVE-2019-12331 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- phpoffice/phpexcel (Packagist): affected all versions up to 1.8.2; no fix listed\n- phpoffice/phpexcel (Packagist): affected all versions up to 1.8.2; no fix listed\n- phpoffice/phpspreadsheet (Packagist): affected all versions; fixed in 1.8.0\n- phpoffice/phpspreadsheet (Packagist): affected all versions; fixed in 1.8.0\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-2019-12331/ (Markdown: https://insights.sbomify.com/CVE-2019-12331/index.md)","id":"CVE-2019-12331","markdown":"https://insights.sbomify.com/CVE-2019-12331/index.md","name":"CVE-2019-12331","record":{"aliases":["GHSA-vvwv-h69m-wg6f"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["data_read","code_execution"],"network_reachable":"yes","non_default_config":false,"product_category":"PHP spreadsheet library","requires_auth":"none","summary":"An attacker can exploit an XXE vulnerability in PhpSpreadsheet to read sensitive files or execute code by bypassing entity checks via double-encoded payloads.","user_interaction":"required","vuln_class":"xxe"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"mitre","cpe":[{"product":"phpspreadsheet","vendor":"phpoffice"}],"cvss":{"score":8.8,"severity":"high","source":"nvd","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","version":"3.1"},"cwes":[{"id":"CWE-611","name":"Improper Restriction of XML External Entity Reference"}],"description":"PHPOffice PhpSpreadsheet before 1.8.0 has an XXE issue. The XmlScanner decodes the sheet1.xml from an .xlsx to utf-8 if something else than UTF-8 is declared in the header. This was a security measurement to prevent CVE-2018-19277 but the fix is not sufficient. By double-encoding the the xml payload to utf-7 it is possible to bypass the check for the string ‚\u003c!ENTITY‘ and thus allowing for an xml external entity processing (XXE) attack.","ecosystems":["Packagist"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"none_known"},"has_fix":true,"headline":"XXE in PHPSpreadsheet due to incomplete fix for previous encoding issue","id":"CVE-2019-12331","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"Packagist","product":null,"products":[],"type":"xxe","year":"2019"},"n_packages":4,"n_references":2,"next":{"headline":"Cross-site scripting in n/a","id":"CVE-2019-12345"},"packages":[{"ecosystem":"Packagist","fixed":[],"introduced":["0"],"last_affected":["1.8.2"],"package":"phpoffice/phpexcel","purl":null,"source":"GHSA-vvwv-h69m-wg6f"},{"ecosystem":"Packagist","fixed":[],"introduced":["0"],"last_affected":["1.8.2"],"package":"phpoffice/phpexcel","purl":"pkg:composer/phpoffice/phpexcel","source":"GHSA-vvwv-h69m-wg6f"},{"ecosystem":"Packagist","fixed":["1.8.0"],"introduced":["0"],"last_affected":[],"package":"phpoffice/phpspreadsheet","purl":null,"source":"GHSA-vvwv-h69m-wg6f"},{"ecosystem":"Packagist","fixed":["1.8.0"],"introduced":["0"],"last_affected":[],"package":"phpoffice/phpspreadsheet","purl":"pkg:composer/phpoffice/phpspreadsheet","source":"GHSA-vvwv-h69m-wg6f"}],"prev":{"headline":"Command injection in n/a","id":"CVE-2019-12328"},"products":["n/a"],"published":"2019-11-07","related":[{"cvss_score":9.2,"headline":"PhpSpreadsheet SSRF and RCE via PHP stream wrappers in IOFactory::load","id":"CVE-2026-34084","kev_date_added":null,"published":"2026-05-05"},{"cvss_score":8.8,"headline":"XML External Entity Reference (XXE) in PHPSpreadsheet","id":"CVE-2024-45048","kev_date_added":null,"published":"2024-08-28"},{"cvss_score":8.8,"headline":"XXE in PHPSpreadsheet due to encoding issue","id":"CVE-2018-19277","kev_date_added":null,"published":"2018-11-14"},{"cvss_score":8.3,"headline":"PhpSpreadsheet vulnerable to unauthorized reflected XSS in the constructor of the Downloader class","id":"CVE-2024-56365","kev_date_added":null,"published":"2025-01-03"},{"cvss_score":8.3,"headline":"PhpSpreadsheet vulnerable to unauthorized reflected XSS in the Accounting.php file","id":"CVE-2024-56366","kev_date_added":null,"published":"2025-01-03"},{"cvss_score":8.3,"headline":"PhpSpreadsheet allows unauthorized reflected XSS in `Convert-Online.php` file","id":"CVE-2024-56408","kev_date_added":null,"published":"2025-01-03"}],"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":"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)"}],"ssvc":{"automatable":null,"exploitation":null,"technical_impact":null},"state":"PUBLISHED","updated":"2024-08-04","vendors":["n/a"]},"summary":"An attacker can exploit an XXE vulnerability in PhpSpreadsheet to read sensitive files or execute code by bypassing entity checks via double-encoded payloads.","url":"https://insights.sbomify.com/CVE-2019-12331/"}