Skip to content
OpenAdvisories
Medium · 6.3 CVE-2025-22145 EUVD-2025-0030GHSA-j3f9-p6hm-5w6q

Carbon has an arbitrary file include via unvalidated input passed to Carbon::setLocale

Published Jan 8, 2025 · Updated Feb 25, 2025 · Assigned by GitHub_M

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 products

VendorProductAffectedFixed
CarbonPHP carbon < 2.72.6, >= 3.0.0, < 3.8.4 —

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Debian 14 php-nesbot-carbon 2.72.6-1 —
Debian 13 php-nesbot-carbon 2.72.6-1 —
Debian 12 php-nesbot-carbon 2.65.0-1+deb12u1 —
Debian 11 php-nesbot-carbon 2.32.2-1+deb11u1 DLA-4068-1
ReleasePackageFixed inAdvisory
Ubuntu 20.04 LTS php-nesbot-carbon No fix yet —

Affected packages

EcosystemPackageAffectedFixedRecord
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

Advisories 1

References