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.

Severity (CVSS 4.0)6.3Medium
Exploit odds (30 days)0.8%top 44.8% of all CVEs
Exploited in the wildNo reportsCISA SSVC: none
Attack toolingNoneno public tooling known

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

EcosystemPackageFixed inAdvisory
Debian:12php-nesbot-carbon2.65.0-1+deb12u1DEBIAN-CVE-2025-22145
Debian:13php-nesbot-carbon2.72.6-1DEBIAN-CVE-2025-22145
Debian:14php-nesbot-carbon2.72.6-1DEBIAN-CVE-2025-22145
Packagistnesbot/carbon3.8.4GHSA-j3f9-p6hm-5w6q
Packagistnesbot/carbon2.72.6GHSA-j3f9-p6hm-5w6q

Affected products (as reported)

VendorProductVersions
CarbonPHP carbon < 2.72.6>= 3.0.0, < 3.8.4

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

References