CVE-2026-27590: CWE-20: Improper Input Validation in caddyserver caddy
Caddy is an extensible server platform that uses TLS by default. Prior to version 2.11.1, Caddy's FastCGI path splitting logic computes the split index on a lowercased copy of the request path and then uses that byte index to slice the original path. This is unsafe for Unicode because `strings.ToLower()` can change UTF-8 byte length for some characters. As a result, Caddy can derive an incorrect `SCRIPT_NAME`/`SCRIPT_FILENAME` and `PATH_INFO`, potentially causing a request that contains `.php` to execute a different on-disk file than intended (path confusion). In setups where an attacker can control file contents (e.g., upload features), this can lead to unintended PHP execution of non-.php files (potential RCE depending on deployment). Version 2.11.1 fixes the issue.
AI Analysis
Technical Summary
CVE-2026-27590 affects the Caddy web server platform, specifically its FastCGI path splitting logic prior to version 2.11.1. The vulnerability stems from the way Caddy processes request paths containing PHP files. The server converts the request path to lowercase using strings.ToLower() to determine the split index for SCRIPT_NAME and PATH_INFO, but this transformation can change the byte length of UTF-8 encoded Unicode characters. Consequently, the byte index used to slice the original path becomes incorrect, leading to path confusion. This means that a request containing '.php' might be mapped to a different on-disk file than intended. In scenarios where an attacker can upload or control file contents, this flaw can be exploited to execute arbitrary code by tricking the server into interpreting non-PHP files as PHP scripts. The vulnerability does not require any authentication or user interaction and can be exploited remotely over the network. The CVSS 4.0 base score is 8.9, reflecting high impact on confidentiality, integrity, and availability, with low attack complexity and no privileges required. The issue is addressed in Caddy 2.11.1 by correcting the path splitting logic to properly handle Unicode characters without altering byte indices.
Potential Impact
This vulnerability poses a significant risk to organizations running vulnerable versions of Caddy server, especially those using FastCGI with PHP. Successful exploitation can lead to remote code execution, allowing attackers to run arbitrary code on the server, potentially leading to full system compromise. This can result in data breaches, service disruption, and unauthorized access to sensitive information. Because no authentication or user interaction is needed, the attack surface is broad. Organizations that allow file uploads or have web applications that accept user-controlled files are particularly at risk, as attackers can upload malicious payloads disguised as non-PHP files but executed as PHP due to path confusion. The impact extends to confidentiality, integrity, and availability of affected systems, making this a critical concern for web hosting providers, SaaS platforms, and enterprises relying on Caddy for web services.
Mitigation Recommendations
1. Upgrade all Caddy server instances to version 2.11.1 or later immediately to apply the official fix. 2. Review and restrict file upload functionalities to prevent unauthorized or unvalidated file uploads, especially disallowing upload of files that could be interpreted as executable scripts. 3. Implement strict input validation and sanitization on all user-supplied data, particularly request paths and filenames. 4. Employ web application firewalls (WAFs) with rules designed to detect and block suspicious FastCGI requests or path traversal attempts. 5. Monitor server logs for anomalous requests containing Unicode characters or unusual path patterns that could indicate exploitation attempts. 6. Consider isolating FastCGI processes and running them with least privilege to limit potential damage from exploitation. 7. Conduct regular security audits and penetration tests focusing on Unicode handling and path parsing logic in web servers. 8. Educate developers and administrators about Unicode normalization issues and their security implications to prevent similar vulnerabilities in custom code.
Affected Countries
United States, Germany, United Kingdom, France, Japan, South Korea, China, India, Canada, Australia
CVE-2026-27590: CWE-20: Improper Input Validation in caddyserver caddy
Description
Caddy is an extensible server platform that uses TLS by default. Prior to version 2.11.1, Caddy's FastCGI path splitting logic computes the split index on a lowercased copy of the request path and then uses that byte index to slice the original path. This is unsafe for Unicode because `strings.ToLower()` can change UTF-8 byte length for some characters. As a result, Caddy can derive an incorrect `SCRIPT_NAME`/`SCRIPT_FILENAME` and `PATH_INFO`, potentially causing a request that contains `.php` to execute a different on-disk file than intended (path confusion). In setups where an attacker can control file contents (e.g., upload features), this can lead to unintended PHP execution of non-.php files (potential RCE depending on deployment). Version 2.11.1 fixes the issue.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
CVE-2026-27590 affects the Caddy web server platform, specifically its FastCGI path splitting logic prior to version 2.11.1. The vulnerability stems from the way Caddy processes request paths containing PHP files. The server converts the request path to lowercase using strings.ToLower() to determine the split index for SCRIPT_NAME and PATH_INFO, but this transformation can change the byte length of UTF-8 encoded Unicode characters. Consequently, the byte index used to slice the original path becomes incorrect, leading to path confusion. This means that a request containing '.php' might be mapped to a different on-disk file than intended. In scenarios where an attacker can upload or control file contents, this flaw can be exploited to execute arbitrary code by tricking the server into interpreting non-PHP files as PHP scripts. The vulnerability does not require any authentication or user interaction and can be exploited remotely over the network. The CVSS 4.0 base score is 8.9, reflecting high impact on confidentiality, integrity, and availability, with low attack complexity and no privileges required. The issue is addressed in Caddy 2.11.1 by correcting the path splitting logic to properly handle Unicode characters without altering byte indices.
Potential Impact
This vulnerability poses a significant risk to organizations running vulnerable versions of Caddy server, especially those using FastCGI with PHP. Successful exploitation can lead to remote code execution, allowing attackers to run arbitrary code on the server, potentially leading to full system compromise. This can result in data breaches, service disruption, and unauthorized access to sensitive information. Because no authentication or user interaction is needed, the attack surface is broad. Organizations that allow file uploads or have web applications that accept user-controlled files are particularly at risk, as attackers can upload malicious payloads disguised as non-PHP files but executed as PHP due to path confusion. The impact extends to confidentiality, integrity, and availability of affected systems, making this a critical concern for web hosting providers, SaaS platforms, and enterprises relying on Caddy for web services.
Mitigation Recommendations
1. Upgrade all Caddy server instances to version 2.11.1 or later immediately to apply the official fix. 2. Review and restrict file upload functionalities to prevent unauthorized or unvalidated file uploads, especially disallowing upload of files that could be interpreted as executable scripts. 3. Implement strict input validation and sanitization on all user-supplied data, particularly request paths and filenames. 4. Employ web application firewalls (WAFs) with rules designed to detect and block suspicious FastCGI requests or path traversal attempts. 5. Monitor server logs for anomalous requests containing Unicode characters or unusual path patterns that could indicate exploitation attempts. 6. Consider isolating FastCGI processes and running them with least privilege to limit potential damage from exploitation. 7. Conduct regular security audits and penetration tests focusing on Unicode handling and path parsing logic in web servers. 8. Educate developers and administrators about Unicode normalization issues and their security implications to prevent similar vulnerabilities in custom code.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2026-02-20T17:40:28.450Z
- Cvss Version
- 4.0
- State
- PUBLISHED
Threat ID: 699e0f3cbe58cf853b290cdf
Added to database: 2/24/2026, 8:51:08 PM
Last enriched: 3/4/2026, 6:50:30 PM
Last updated: 4/10/2026, 9:48:26 AM
Views: 80
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.