Vulnerability · Published Jan 8, 2025 · Assigned by GitHub_M
CVE-2025-22145Carbon has an arbitrary file include via unvalidated input passed to Carbon::setLocale
Medium 6.3
In plain English
A medium-severity security flaw in carbon from CarbonPHP. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.8% (higher than 55% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official 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.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian:12 | php-nesbot-carbon | 2.65.0-1+deb12u1 | DEBIAN-CVE-2025-22145 |
| Debian:13 | php-nesbot-carbon | 2.72.6-1 | DEBIAN-CVE-2025-22145 |
| Debian:14 | php-nesbot-carbon | 2.72.6-1 | DEBIAN-CVE-2025-22145 |
| Packagist | nesbot/carbon | 3.8.4 | GHSA-j3f9-p6hm-5w6q |
| Packagist | nesbot/carbon | 2.72.6 | GHSA-j3f9-p6hm-5w6q |
Affected products (as reported)
Weakness: CWE-98 · 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