CVE-2025-22145CarbonPHP carbon
Medium 6.3 No auth needed
Follow: this CVE · CarbonPHP · CarbonPHP carbon We alert you by email or Slack (account required).
- Priority
- 53
- CVSS 4.0
- 6.3
- EPSS
- 1.0% probability of exploitation in 30 days · percentile 62
- Auth required
- No
- Published
- Jan 8, 2025
- Updated
- Jun 17, 2026
- Category
- Application · Cross-platform
- Weakness (CWE)
- CWE-98
- SSVC (CISA)
- Exploitation: none · Automatable: no · Technical impact: partial
- 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/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
What happens
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.
What to do
- Apply the vendor's security update for carbon.
- It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.
Affected packages
| Ecosystem | Package | Affected versions | Fixed in | How to upgrade |
|---|---|---|---|---|
| Packagist | nesbot/carbon |
≥ 3.0.0 < 3.8.4 |
3.8.4 |
composer require "nesbot/carbon:^3.8.4" |
| Packagist | nesbot/carbon |
< 2.72.6 |
2.72.6 |
composer require "nesbot/carbon:^2.72.6" |
Per OSV / GitHub Advisories (GHSA-j3f9-p6hm-5w6q). Check the version in your lockfile before upgrading.
Affected products
- CarbonPHP · carbon
As reported by the CNA that published the CVE. NVD has not added CPEs with versions yet.
Official sources
References
Links published by the sources. Open them with care.