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
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| 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.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| 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 |
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 20.04 LTS | php-nesbot-carbon | No fix yet | — |
Affected packages
| Ecosystem | Package | Affected | Fixed | Record |
|---|---|---|---|---|
| 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
- DLA-4068-1 php-nesbot-carbon - security update Debian Security (DSA / DLA) · Mar 9, 2026