Home / CarbonPHP / carbon / CVE-2025-22145
CVE-2025-22145: is it exploited, and which versions of CarbonPHP carbon are affected and fixed?
CVE-2025-22145 is a PHP file inclusion vulnerability in CarbonPHP carbon. It is not known to be exploited: it is not in CISA's Known Exploited Vulnerabilities catalog (catalog 2026.11.30, read December 3, 2026, 12:08 UTC). Affected: nesbot/carbon from 3.0.0 before 3.8.4 and nesbot/carbon before 2.72.6 (GitHub advisory GHSA-j3f9-p6hm-5w6q). Fixed in 3.8.4 and 2.72.6 (GitHub advisory GHSA-j3f9-p6hm-5w6q). Severity: Medium (6.3, CVSS 4.0, from GitHub_M).
Data checked December 3, 2026: last read CISA KEV December 3, 2026, 12:08 UTC, CVE record November 19, 2026, 07:10 UTC and NVD November 19, 2026, 07:23 UTC.
What is CVE-2025-22145?
Carbon has an arbitrary file include via unvalidated input passed to Carbon::setLocale
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.
From the CVE record by GitHub_M, last updated February 25, 2025, 13:07 UTC.
Which versions are affected, and which fix it?
| Vendor | Product | Affected | Fixed or not affected from |
|---|---|---|---|
| CarbonPHP | carbon | < 2.72.6 >= 3.0.0, < 3.8.4 |
As the CVE record by GitHub_M states it, last updated February 25, 2025. Version ranges are the CNA's; a version the record calls not affected is usually the fix.
Which packages are affected, and in which version is each fixed?
| Ecosystem | Package | Affected | Fixed in | Advisory |
|---|---|---|---|---|
| Packagist | nesbot/carbon | >= 3.0.0, < 3.8.4 | 3.8.4 | GHSA-j3f9-p6hm-5w6q |
| Packagist | nesbot/carbon | < 2.72.6 | 2.72.6 | GHSA-j3f9-p6hm-5w6q |
GitHub Advisory Database, reviewed advisories (CC BY 4.0); advisory updated February 25, 2025. Summary: Carbon has an arbitrary file include via unvalidated input passed to Carbon::setLocale.
How severe is CVE-2025-22145?
| Score | Version | Vector | Source |
|---|---|---|---|
| Medium 6.3 | CVSS 4.0 | 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_M |
Each score is shown as its source gave it: the CNA that wrote the record, CISA's ADP (vulnrichment) and the NVD. They can differ.
What the ratings mean: in CVSS 3 and 4, scores run from 0 to 10, with Low 0.1 to 3.9, Medium 4.0 to 6.9, High 7.0 to 8.9 and Critical 9.0 to 10.0. CVSS 2 has no Critical band: its High runs from 7.0 to 10.0. The vector lists how the flaw is reached (network, local), what an attacker needs (privileges, a user's click) and what it can harm.
Is CVE-2025-22145 exploited in the wild?
- CISA KEV
- Not listed (catalog 2026.11.30)
- CISA SSVC
- Exploitation: none; automatable: no; technical impact: partial (CISA ADP, January 9, 2025)
- EPSS
- 0.75% probability of exploitation activity in the next 30 days, percentile 56.3 (FIRST EPSS, scores of December 2, 2026)
What kind of flaw is it?
- CWE-98 Improper Control of Filename for Include/Require Statement in PHP Program
Where are the vendor advisories and references?
- https://github.com/CarbonPHP/carbon/security/advisories/GHSA-j3f9-p6hm-5w6q x_refsource_CONFIRM
- https://github.com/briannesbitt/Carbon/commit/129700ed449b1f02d70272d2ac802357c8c30c58 x_refsource_MISC
- https://lists.debian.org/debian-lts-announce/2025/02/msg00032.html
When was it published, and where is the official record?
- Reserved
- December 30, 2024
- Published
- January 8, 2025, 20:40 UTC
- CVE record updated
- February 25, 2025, 13:07 UTC by GitHub_M
- NVD
- Deferred, last modified June 17, 2026, 08:45 UTC
- Last checked
- CVE list November 19, 2026, 07:10 UTC; NVD November 19, 2026, 07:23 UTC; KEV December 3, 2026, 12:08 UTC; EPSS December 2, 2026
- Official record
- cve.org · NVD
Questions about CVE-2025-22145
Is CVE-2025-22145 exploited in the wild?
Not as far as CISA knows: it is not in the Known Exploited Vulnerabilities catalog, read December 3, 2026, 12:08 UTC. FIRST's EPSS gives it a 0.75% chance of exploitation activity in the next 30 days (scores of December 2, 2026).
Which versions of CarbonPHP carbon are affected by CVE-2025-22145?
nesbot/carbon from 3.0.0 before 3.8.4 and nesbot/carbon before 2.72.6, per the GitHub advisory GHSA-j3f9-p6hm-5w6q. The tables above give every range the sources list.
Which version fixes CVE-2025-22145?
3.8.4 and 2.72.6, per the GitHub advisory GHSA-j3f9-p6hm-5w6q. Check the vendor's advisory before you rely on it.
How severe is CVE-2025-22145?
Medium (6.3, CVSS 4.0, from GitHub_M). The severity table above shows each score with its source.
Where is the official record of CVE-2025-22145?
The CVE Program's record is at cve.org and the NVD's at nvd.nist.gov. For a fix, the vendor's own advisory is the one to follow.