The SentinelOne Annual Threat Report - A Defenders Guide from the FrontlinesThe SentinelOne Annual Threat ReportGet the Report
Experiencing a Breach?Blog
Get StartedContact Us
SentinelOne
  • Platform
    Platform Overview
    • Singularity Platform
      Welcome to Integrated Enterprise Security
    • AI for Security
      Leading the Way in AI-Powered Security Solutions
    • Securing AI
      Accelerate AI Adoption with Secure AI Tools, Apps, and Agents.
    • How It Works
      The Singularity XDR Difference
    • Singularity Marketplace
      One-Click Integrations to Unlock the Power of XDR
    • Pricing & Packaging
      Comparisons and Guidance at a Glance
    Data & AI
    • Purple AI
      Accelerate SecOps with Generative AI
    • Singularity Hyperautomation
      Easily Automate Security Processes
    • AI-SIEM
      The AI SIEM for the Autonomous SOC
    • Data Pipelines
      Security Data Pipeline for AI SIEM and Data Optimization
    • Singularity Data Lake
      AI-Powered, Unified Data Lake
    • Singularity Data Lake for Log Analytics
      Seamlessly Ingest Data from On-Prem, Cloud or Hybrid Environments
    Endpoint Security
    • Singularity Endpoint
      Autonomous Prevention, Detection, and Response
    • Singularity XDR
      Native & Open Protection, Detection, and Response
    • Singularity RemoteOps Forensics
      Orchestrate Forensics at Scale
    • Singularity Threat Intelligence
      Comprehensive Adversary Intelligence
    • Singularity Vulnerability Management
      Application & OS Vulnerability Management
    • Singularity Identity
      Identity Threat Detection and Response
    Cloud Security
    • Singularity Cloud Security
      Block Attacks with an AI-Powered CNAPP
    • Singularity Cloud Native Security
      Secure Cloud and Development Resources
    • Singularity Cloud Workload Security
      Real-Time Cloud Workload Protection Platform
    • Singularity Cloud Data Security
      AI-Powered Threat Detection for Cloud Storage
    • Singularity Cloud Security Posture Management
      Detect and Remediate Cloud Misconfigurations
    Securing AI
    • Prompt Security
      Secure AI Tools Across Your Enterprise
  • Why SentinelOne?
    Why SentinelOne?
    • Why SentinelOne?
      Cybersecurity Built for What’s Next
    • Our Customers
      Trusted by the World’s Leading Enterprises
    • Industry Recognition
      Tested and Proven by the Experts
    • About Us
      The Industry Leader in Autonomous Cybersecurity
    Compare SentinelOne
    • Arctic Wolf
    • Broadcom
    • CrowdStrike
    • Cybereason
    • Microsoft
    • Palo Alto Networks
    • Sophos
    • Splunk
    • Trellix
    • Trend Micro
    • Wiz
    Verticals
    • Energy
    • Federal Government
    • Finance
    • Healthcare
    • Higher Education
    • K-12 Education
    • Manufacturing
    • Retail
    • State and Local Government
  • Services
    Managed Services
    • Managed Services Overview
      Wayfinder Threat Detection & Response
    • Threat Hunting
      World-Class Expertise and Threat Intelligence
    • Managed Detection & Response
      24/7/365 Expert MDR Across Your Entire Environment
    • Incident Readiness & Response
      DFIR, Breach Readiness, & Compromise Assessments
    Support, Deployment, & Health
    • Technical Account Management
      Customer Success with Personalized Service
    • SentinelOne GO
      Guided Onboarding & Deployment Advisory
    • SentinelOne University
      Live and On-Demand Training
    • Services Overview
      Comprehensive Solutions for Seamless Security Operations
    • SentinelOne Community
      Community Login
  • Partners
    Our Network
    • MSSP Partners
      Succeed Faster with SentinelOne
    • Singularity Marketplace
      Extend the Power of S1 Technology
    • Cyber Risk Partners
      Enlist Pro Response and Advisory Teams
    • Technology Alliances
      Integrated, Enterprise-Scale Solutions
    • SentinelOne for AWS
      Hosted in AWS Regions Around the World
    • Channel Partners
      Deliver the Right Solutions, Together
    • SentinelOne for Google Cloud
      Unified, Autonomous Security Giving Defenders the Advantage at Global Scale
    • Partner Locator
      Your Go-to Source for Our Top Partners in Your Region
    Partner Portal→
  • Resources
    Resource Center
    • Case Studies
    • Data Sheets
    • eBooks
    • Reports
    • Videos
    • Webinars
    • Whitepapers
    • Events
    View All Resources→
    Blog
    • Feature Spotlight
    • For CISO/CIO
    • From the Front Lines
    • Identity
    • Cloud
    • macOS
    • SentinelOne Blog
    Blog→
    Tech Resources
    • SentinelLABS
    • Ransomware Anthology
    • Cybersecurity 101
  • About
    About SentinelOne
    • About SentinelOne
      The Industry Leader in Cybersecurity
    • Investor Relations
      Financial Information & Events
    • SentinelLABS
      Threat Research for the Modern Threat Hunter
    • Careers
      The Latest Job Opportunities
    • Press & News
      Company Announcements
    • Cybersecurity Blog
      The Latest Cybersecurity Threats, News, & More
    • FAQ
      Get Answers to Our Most Frequently Asked Questions
    • DataSet
      The Live Data Platform
    • S Foundation
      Securing a Safer Future for All
    • S Ventures
      Investing in the Next Generation of Security, Data and AI
  • Pricing
Get StartedContact Us
CVE Vulnerability Database
Vulnerability Database/CVE-2025-22145

CVE-2025-22145: Carbon PHP Extension RCE Vulnerability

CVE-2025-22145 is a remote code execution flaw in Carbon PHP extension that allows arbitrary file inclusion via unsanitized input. This article covers the technical details, affected versions, and mitigation steps.

Updated: January 22, 2026

CVE-2025-22145 Overview

CVE-2025-22145 is a Local File Inclusion (LFI) vulnerability affecting Carbon, a popular international PHP extension for DateTime handling. Applications that pass unsanitized user input to Carbon::setLocale() are at risk of arbitrary file inclusion. When exploited in conjunction with the ability to upload PHP files to an accessible directory, this vulnerability can lead to arbitrary code execution on affected servers.

Critical Impact

Applications allowing user-controlled locale settings combined with PHP file uploads may be vulnerable to arbitrary code execution through local file inclusion.

Affected Products

  • Carbon PHP DateTime Extension versions prior to 3.8.4
  • Carbon PHP DateTime Extension versions prior to 2.72.6
  • Debian systems using vulnerable Carbon packages

Discovery Timeline

  • 2025-01-08 - CVE CVE-2025-22145 published to NVD
  • 2025-02-25 - Last updated in NVD database

Technical Details for CVE-2025-22145

Vulnerability Analysis

The vulnerability exists in the locale handling mechanism of the Carbon PHP library. When applications pass user-controlled input directly to the Carbon::setLocale() method without proper sanitization, an attacker can manipulate the locale parameter to include arbitrary PHP files from the server's filesystem.

The exploitation chain requires two conditions: first, the application must use user input for locale configuration without validation, and second, the attacker must be able to upload or have access to a PHP file in a directory that can be included by the application. When both conditions are met, the attacker can achieve remote code execution by including their malicious PHP file through the locale mechanism.

The CWE-98 (Improper Control of Filename for Include/Require Statement in PHP Program) classification accurately describes this vulnerability pattern, where the include path is constructed using untrusted input.

Root Cause

The root cause lies in the AbstractTranslator.php file where locale validation was performed too late in the execution flow. The vulnerable code would construct a file path using the user-supplied locale value before validating whether it was a legitimate locale identifier. This allowed attackers to inject path traversal sequences or arbitrary file paths that would be passed to PHP's include statement.

Attack Vector

The attack requires network access and involves sending crafted locale values to the application's locale-setting functionality. An attacker would:

  1. Identify an application endpoint that accepts locale parameters
  2. Upload a malicious PHP file to an accessible directory (if upload functionality exists)
  3. Craft a malicious locale value containing path traversal sequences pointing to the uploaded file
  4. Submit the crafted request, causing the malicious PHP file to be included and executed
php
            return true;
        }

+        $this->assertValidLocale($locale);
+
        foreach ($this->getDirectories() as $directory) {
            $data = @include \sprintf('%s/%s.php', rtrim($directory, '\\/'), $locale);

Source: GitHub Commit

The patch adds locale validation ($this->assertValidLocale($locale)) before the include statement is executed, ensuring that only legitimate locale identifiers are processed.

Detection Methods for CVE-2025-22145

Indicators of Compromise

  • Unusual or malformed locale parameter values in application logs containing path traversal sequences (../, ..\\)
  • HTTP requests with locale parameters containing file extensions (.php, .inc)
  • Presence of unexpected PHP files in upload directories or temporary folders
  • Web server error logs showing failed include attempts with unusual paths

Detection Strategies

  • Implement Web Application Firewall (WAF) rules to detect path traversal patterns in locale-related parameters
  • Monitor application logs for locale values that deviate from standard locale format patterns (e.g., en_US, fr_FR)
  • Deploy file integrity monitoring on directories accessible to PHP include operations
  • Review PHP error logs for include/require failures that may indicate exploitation attempts

Monitoring Recommendations

  • Enable verbose logging for locale-setting operations in Carbon-based applications
  • Set up alerts for new PHP file uploads to application-accessible directories
  • Monitor for process spawning from web server processes that may indicate successful code execution
  • Implement anomaly detection for unusual patterns in locale parameter usage

How to Mitigate CVE-2025-22145

Immediate Actions Required

  • Update Carbon to version 3.8.4 or later for 3.x branch installations
  • Update Carbon to version 2.72.6 or later for 2.x branch installations
  • Audit application code to identify any instances of unsanitized user input being passed to Carbon::setLocale()
  • Restrict PHP file uploads and ensure uploaded files cannot be included by the application

Patch Information

The vulnerability is fixed in Carbon versions 3.8.4 and 2.72.6. The fix introduces early locale validation in the AbstractTranslator.php file before the locale value is used to construct include paths. Review the GitHub Security Advisory for complete details on the patch. Debian users should refer to the Debian LTS Announcement for package updates.

Workarounds

  • Implement application-level input validation for locale parameters using an allowlist of acceptable locale codes
  • Disable or restrict file upload functionality in applications using vulnerable Carbon versions
  • Configure PHP open_basedir to limit the directories from which files can be included
  • Use disable_functions in php.ini to restrict dangerous functions if code execution is achieved
bash
# Configuration example - Restrict PHP include paths
# Add to php.ini or .htaccess
open_basedir = /var/www/html:/tmp
# Whitelist acceptable locales in application configuration
# Example: ALLOWED_LOCALES="en_US,en_GB,fr_FR,de_DE,es_ES"

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

  • Vulnerability Details
  • TypeRCE

  • Vendor/TechCarbon

  • SeverityMEDIUM

  • CVSS Score6.3

  • EPSS Probability0.11%

  • Known ExploitedNo
  • CVSS 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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityLow
  • CWE References
  • CWE-98
  • Technical References
  • GitHub Security Advisory

  • GitHub Commit Update

  • Debian LTS Announcement
  • Latest CVEs
  • CVE-2025-9185: Mozilla Firefox RCE Vulnerability

  • CVE-2025-9184: Mozilla Firefox RCE Vulnerability

  • CVE-2025-9180: Mozilla Firefox Auth Bypass Vulnerability

  • CVE-2025-8030: Mozilla Firefox RCE Vulnerability
Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the World’s Most Advanced Cybersecurity Platform

See how our intelligent, autonomous cybersecurity platform can protect your organization now and into the future.

Try SentinelOne
  • Get Started
  • Get a Demo
  • Product Tour
  • Why SentinelOne
  • Pricing & Packaging
  • FAQ
  • Contact
  • Contact Us
  • Customer Support
  • SentinelOne Status
  • Language
  • Platform
  • Singularity Platform
  • Singularity Endpoint
  • Singularity Cloud
  • Singularity AI-SIEM
  • Singularity Identity
  • Singularity Marketplace
  • Purple AI
  • Services
  • Wayfinder TDR
  • SentinelOne GO
  • Technical Account Management
  • Support Services
  • Verticals
  • Energy
  • Federal Government
  • Finance
  • Healthcare
  • Higher Education
  • K-12 Education
  • Manufacturing
  • Retail
  • State and Local Government
  • Cybersecurity for SMB
  • Resources
  • Blog
  • Labs
  • Case Studies
  • Videos
  • Product Tours
  • Events
  • Cybersecurity 101
  • eBooks
  • Webinars
  • Whitepapers
  • Press
  • News
  • Ransomware Anthology
  • Company
  • About Us
  • Our Customers
  • Careers
  • Partners
  • Legal & Compliance
  • Security & Compliance
  • Investor Relations
  • S Foundation
  • S Ventures

©2026 SentinelOne, All Rights Reserved.

Privacy Notice Terms of Use

English