Advisory Database
  • Advisories
  • Dependency Scanning
  1. composer
  2. ›
  3. nesbot/carbon
  4. ›
  5. CVE-2025-22145

CVE-2025-22145: Carbon has an arbitrary file include via unvalidated input passed to Carbon::setLocale

January 8, 2025 (updated February 25, 2025)

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.

References

  • github.com/CarbonPHP/carbon
  • github.com/CarbonPHP/carbon/security/advisories/GHSA-j3f9-p6hm-5w6q
  • github.com/advisories/GHSA-j3f9-p6hm-5w6q
  • github.com/briannesbitt/Carbon/commit/129700ed449b1f02d70272d2ac802357c8c30c58
  • lists.debian.org/debian-lts-announce/2025/02/msg00032.html
  • nvd.nist.gov/vuln/detail/CVE-2025-22145

Code Behaviors & Features

Detect and mitigate CVE-2025-22145 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 2.72.6, all versions starting from 3.0.0 before 3.8.4

Fixed versions

  • 3.8.4
  • 2.72.6

Solution

Upgrade to versions 2.72.6, 3.8.4 or above.

Weakness

  • CWE-98: Improper Control of Filename for Include/Require Statement in PHP Program ('PHP Remote File Inclusion')

Source file

packagist/nesbot/carbon/CVE-2025-22145.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Wed, 14 May 2025 12:16:08 +0000.