# CVE-2025-22145: Carbon has an arbitrary file include via unvalidated input passed to Carbon::setLocale

- Severity: Medium 6.3 (CVSS:4.0, scored by GitHub_M) `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`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.75%, higher than 56% of CVEs (2026-12-01)
- Published: 2025-01-08T20:40:37.545Z
- Modified: 2026-06-17T08:45:20.153Z
- Also known as: GHSA-j3f9-p6hm-5w6q
- Weaknesses: CWE-98
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: GitHub_M

## 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.

(As written by CVE List.)

## Affected

- CarbonPHP carbon: < 2.72.6; >= 3.0.0, < 3.8.4
- nesbot/carbon (Packagist): from 3.0.0 before 3.8.4; before 2.72.6

## Every score

- GitHub_M: CVSS:4.0 6.3 Medium `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`
- GitHub: CVSS:4.0 Medium `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`

## References

- <https://github.com/CarbonPHP/carbon/security/advisories/GHSA-j3f9-p6hm-5w6q> (web)
- <https://github.com/briannesbitt/Carbon/commit/129700ed449b1f02d70272d2ac802357c8c30c58> (web)
- <https://lists.debian.org/debian-lts-announce/2025/02/msg00032.html> (web)
- <https://nvd.nist.gov/vuln/detail/CVE-2025-22145> (advisory)
- <https://github.com/CarbonPHP/carbon> (package)

## Sources

- CVE List: [CVE-2025-22145](https://www.cve.org/CVERecord?id=CVE-2025-22145), CVE Terms of Use, modified 2025-02-25
- GitHub Advisory Database: [GHSA-j3f9-p6hm-5w6q](https://github.com/advisories/GHSA-j3f9-p6hm-5w6q), CC-BY-4.0, modified 2025-02-25
- NVD: [CVE-2025-22145](https://nvd.nist.gov/vuln/detail/CVE-2025-22145), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2025-22145 · Whole record: https://cve.day/CVE-2025-22145.json · Rebuilt by cve.day 2026-11-25T22:58:53.172Z
