{"answers":{"affected":"2 open source packages ship an affected version, including knplabs/knp-snappy. It affects 1 product.","exploited":"There is no known exploitation of CVE-2023-28115 in the wild and no public exploit code.","fix":"Upgrade knplabs/knp-snappy to 1.4.2 or later.","what":"CVE-2023-28115 is a critical unsafe deserialization vulnerability in KnpLabs snappy, published on 17 Mar 2023. An attacker can exploit it over the internet without logging in, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2023-28115 and fix it if it is affected.\n\nWhat it is: CVE-2023-28115 is a critical unsafe deserialization vulnerability in KnpLabs snappy, published on 17 Mar 2023. An attacker can exploit it over the internet without logging in, with no action from the victim.\nExploitation: There is no known exploitation of CVE-2023-28115 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- knplabs/knp-snappy (Packagist): affected all versions; fixed in 1.4.2\n- knplabs/knp-snappy (Packagist): affected all versions; fixed in 1.4.2\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-2023-28115/ (Markdown: https://insights.sbomify.com/CVE-2023-28115/index.md)","id":"CVE-2023-28115","markdown":"https://insights.sbomify.com/CVE-2023-28115/index.md","name":"CVE-2023-28115","record":{"aliases":["DEBIAN-CVE-2023-28115","GHSA-gq6w-q6wh-jggc","UBUNTU-CVE-2023-28115"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["code_execution"],"network_reachable":"yes","non_default_config":false,"product_category":"PHP Snappy library","requires_auth":"none","summary":"Attackers can achieve remote code execution via PHAR deserialization in the Snappy PHP library if they can upload files and trigger specific functions.","user_interaction":"not_required","vuln_class":"deserialization"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"snappy","vendor":"knplabs"}],"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-502","name":"Deserialization of Untrusted Data"}],"description":"Snappy is a PHP library allowing thumbnail, snapshot or PDF generation from a url or a html page. Prior to version 1.4.2, Snappy is vulnerable to PHAR deserialization due to a lack of checking on the protocol before passing it into the `file_exists()` function. If an attacker can upload files of any type to the server he can pass in the phar:// protocol to unserialize the uploaded file and instantiate arbitrary PHP objects. This can lead to remote code execution especially when snappy is used with frameworks with documented POP chains like Laravel/Symfony vulnerable developer code. If a user can control the output file from the `generateFromHtml()` function, it will invoke deserialization. This vulnerability is capable of remote code execution if Snappy is used with frameworks or developer code with vulnerable POP chains. It has been fixed in version 1.4.2.","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":"Snappy vulnerable to PHAR deserialization, allowing remote code execution","id":"CVE-2023-28115","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"Packagist","product":null,"products":[],"type":"deserialization","year":"2023"},"n_packages":2,"n_references":6,"next":{"headline":"Buffer overflow in L2CAP due to misconfigured MTU","id":"CVE-2023-28116"},"packages":[{"ecosystem":"Packagist","fixed":["1.4.2"],"introduced":["0"],"last_affected":[],"package":"knplabs/knp-snappy","purl":null,"source":"GHSA-gq6w-q6wh-jggc"},{"ecosystem":"Packagist","fixed":["1.4.2"],"introduced":["0"],"last_affected":[],"package":"knplabs/knp-snappy","purl":"pkg:composer/knplabs/knp-snappy","source":"GHSA-gq6w-q6wh-jggc"}],"prev":{"headline":"`cilium-cli` disables etcd authorization for clustermesh clusters","id":"CVE-2023-28114"},"products":["snappy"],"published":"2023-03-17","related":[{"cvss_score":9.8,"headline":"Unsafe deserialization in knplabs/knp-snappy","id":"CVE-2023-41330","kev_date_added":null,"published":"2023-09-06"}],"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":"yes","exploitation":"none","technical_impact":"total"},"state":"PUBLISHED","updated":"2025-02-25","vendors":["KnpLabs"]},"summary":"Attackers can achieve remote code execution via PHAR deserialization in the Snappy PHP library if they can upload files and trigger specific functions.","url":"https://insights.sbomify.com/CVE-2023-28115/"}