{"answers":{"affected":"4 open source packages ship an affected version, including nesbot/carbon.","exploited":"There is no known exploitation of CVE-2025-22145 in the wild and no public exploit code.","fix":"Upgrade nesbot/carbon to a fixed version for your release line: 2.72.6 or 3.8.4.","what":"CVE-2025-22145 is a medium-severity vulnerability in CarbonPHP carbon, published on 8 Jan 2025. An attacker can exploit it over the internet without logging in, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2025-22145 and fix it if it is affected.\n\nWhat it is: CVE-2025-22145 is a medium-severity vulnerability in CarbonPHP carbon, published on 8 Jan 2025. 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-2025-22145 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- nesbot/carbon (Packagist): affected all versions; fixed in 2.72.6\n- nesbot/carbon (Packagist): affected all versions; fixed in 2.72.6\n- nesbot/carbon (Packagist): affected from 3.0.0; fixed in 3.8.4\n- nesbot/carbon (Packagist): affected from 3.0.0; fixed in 3.8.4\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-2025-22145/ (Markdown: https://insights.sbomify.com/CVE-2025-22145/index.md)","id":"CVE-2025-22145","markdown":"https://insights.sbomify.com/CVE-2025-22145/index.md","name":"CVE-2025-22145","record":{"aliases":["CLSA-2025-1756946896","CLSA-2026-1771375695","DEBIAN-CVE-2025-22145","DLA-4068-1","GHSA-j3f9-p6hm-5w6q","UBUNTU-CVE-2025-22145"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["code_execution"],"network_reachable":"yes","non_default_config":true,"product_category":"PHP DateTime library","requires_auth":"none","summary":"Attackers can achieve arbitrary code execution if applications pass unsanitized input to Carbon::setLocale and allow PHP file uploads.","user_interaction":"not_required","vuln_class":"file_upload"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[],"cvss":{"score":6.3,"severity":"medium","source":"cna","vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N","version":"4.0"},"cwes":[{"id":"CWE-98","name":"Improper Control of Filename for Include/Require Statement in PHP Program"}],"description":"Carbon is an international PHP extension for DateTime. Application passing unsanitized user input to Carbon::setLocale are at risk of arbitrary file include, if the application allows users to upload files with .php extension in an folder that allows include or require to read it, then they are at risk of arbitrary code ran on their servers. This vulnerability is fixed in 3.8.4 and 2.72.6.","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":"Carbon has an arbitrary file include via unvalidated input passed to Carbon::setLocale","id":"CVE-2025-22145","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"Packagist","product":null,"products":[],"type":"file_upload","year":"2025"},"n_packages":4,"n_references":2,"next":{"headline":"Improper authentication on SAML SSO process allows user impersonation in sentry","id":"CVE-2025-22146"},"packages":[{"ecosystem":"Packagist","fixed":["2.72.6"],"introduced":["0"],"last_affected":[],"package":"nesbot/carbon","purl":null,"source":"GHSA-j3f9-p6hm-5w6q"},{"ecosystem":"Packagist","fixed":["2.72.6"],"introduced":["0"],"last_affected":[],"package":"nesbot/carbon","purl":"pkg:composer/nesbot/carbon","source":"GHSA-j3f9-p6hm-5w6q"},{"ecosystem":"Packagist","fixed":["3.8.4"],"introduced":["3.0.0"],"last_affected":[],"package":"nesbot/carbon","purl":null,"source":"GHSA-j3f9-p6hm-5w6q"},{"ecosystem":"Packagist","fixed":["3.8.4"],"introduced":["3.0.0"],"last_affected":[],"package":"nesbot/carbon","purl":"pkg:composer/nesbot/carbon","source":"GHSA-j3f9-p6hm-5w6q"}],"prev":{"headline":"Account Takeover in NamelessMC","id":"CVE-2025-22144"},"products":["carbon"],"published":"2025-01-08","related":[],"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":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"no","exploitation":"none","technical_impact":"partial"},"state":"PUBLISHED","updated":"2025-02-25","vendors":["CarbonPHP"]},"summary":"Attackers can achieve arbitrary code execution if applications pass unsanitized input to Carbon::setLocale and allow PHP file uploads.","url":"https://insights.sbomify.com/CVE-2025-22145/"}