CVE-2025-22145
Carbon has an arbitrary file include via unvalidated input passed to Carbon::setLocale
MEDIUM 6.3
At a glance
- Source
- NVD
- EPSS
- EPSS 0.75 % · percentile 55 ()
- State
- PUBLISHED
- Published
- Updated
- Assigner
- GitHub_M
- NVD status
- Deferred
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.
Weaknesses (CWE)
- CWE-98 — Improper Control of Filename for Include/Require Statement in PHP Program
References
Scores
| Version | Score | Vector | Scored by |
|---|---|---|---|
| CVSS 4.0 | MEDIUM 6.3 | 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 |
| CVSS 4.0 | MEDIUM 6.3 | 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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X | NVD · security-advisories@github.com (Secondary) |
Advisories
- GHSA-j3f9-p6hm-5w6q — Carbon has an arbitrary file include via unvalidated input passed to Carbon::setLocale
European references
- ENISA EUVD · EUVD-2025-0030
- GCVE · GCVE-0-2025-22145
Affected products
| Product | Versions |
|---|---|
| CarbonPHP · carbon | affected < 2.72.6 ; affected >= 3.0.0, < 3.8.4 |
Sources
| Source | Licence |
|---|---|
| CVE List (CVEProject cvelistV5) | CVE Program Terms of Use |
| EPSS (FIRST.org) | FIRST — attribution requested |
| ENISA EUVD | ENISA — reproduction authorised, source acknowledged |
| NVD (NIST) via fkie-cad/nvd-json-data-feeds | Public domain — this product uses data from the NVD API but is not endorsed or certified by the NVD |