/

CVE-2026-115935

Severity:

HIGH RISK

(8.8)

CRLF Injection (CWE-94) in Craft API Response Headers

CVE-2026-115935

Awaiting Analysis

Vulnerability type

Category:

Code Injection

CWE:

CWE-94

Impact:

Authentication Bypass and Remote Code Execution

Severity:

HIGH RISK

(8.8)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

A vulnerability in Craft's process-api-response-headers action allows an authenticated control panel user with accessCp permission to inject newline characters into a trusted API response header. This can alter the generated environment configuration, replace the Craft security key, and may enable forged signed redirects that execute server-side functionality.

A vulnerability in Craft's process-api-response-headers action allows an authenticated control panel user with accessCp permission to inject newline characters into a trusted API response header. This can alter the generated environment configuration, replace the Craft security key, and may enable forged signed redirects that execute server-side functionality.

Affected context

The issue occurs when Craft accepts API response headers as trusted input and writes the X-Craft-Plugin-Licenses value into the .env file without removing embedded newline characters. Affected deployments are those where a non-administrative authenticated control panel user has accessCp permission and can cause the response-header processing path to run.

The issue occurs when Craft accepts API response headers as trusted input and writes the X-Craft-Plugin-Licenses value into the .env file without removing embedded newline characters. Affected deployments are those where a non-administrative authenticated control panel user has accessCp permission and can cause the response-header processing path to run.

Exploit preconditions

  • Attack surface: Craft control panel API response-header processing - Required access: An authenticated control panel account with accessCp

permission

  • Trigger point: Processing of a crafted X-Craft-Plugin-Licenses response

header

  • Why exploitation is possible: Embedded line breaks are preserved while the

value is written to the environment file, allowing security-sensitive

configuration data to be modified and subsequently trusted by Craft

  • Attack surface: Craft control panel API response-header processing - Required access: An authenticated control panel account with accessCp

permission

  • Trigger point: Processing of a crafted X-Craft-Plugin-Licenses response

header

  • Why exploitation is possible: Embedded line breaks are preserved while the

value is written to the environment file, allowing security-sensitive

configuration data to be modified and subsequently trusted by Craft

Why this happens

The underlying bug is a failure to treat externally supplied HTTP header values as untrusted data before persisting them as environment configuration. Newline characters are not normalized or rejected, so a header value can cross a configuration boundary and introduce additional environment entries. This maps to CWE-94 because the resulting configuration change can influence later interpretation and execution of server-side template or callback behavior.

The underlying bug is a failure to treat externally supplied HTTP header values as untrusted data before persisting them as environment configuration. Newline characters are not normalized or rejected, so a header value can cross a configuration boundary and introduce additional environment entries. This maps to CWE-94 because the resulting configuration change can influence later interpretation and execution of server-side template or callback behavior.

Potential impact

  • An attacker may replace the application's security key with a known value.
  • An attacker could forge signed login redirects or other security-sensitive tokens.
  • The vulnerability may enable unauthorized account access or privilege escalation.
  • Server-side template functionality could be abused to execute commands.
  • The application and its stored data may be compromised.
  • An attacker may replace the application's security key with a known value.
  • An attacker could forge signed login redirects or other security-sensitive tokens.
  • The vulnerability may enable unauthorized account access or privilege escalation.
  • Server-side template functionality could be abused to execute commands.
  • The application and its stored data may be compromised.

General mitigation guidance

Mitigation generally focuses on preserving trust boundaries between HTTP metadata and configuration files. Header values should be treated as untrusted, with control characters rejected or safely normalized before any persistence. Configuration writers should use structured serialization rather than line-oriented string concatenation, and security-sensitive environment values should not be derived directly from request- or response-controlled data. Strict allowlists, immutable configuration paths, key rotation procedures, and least-privilege control panel roles can reduce exposure. Template and callback execution should also remain disabled or tightly constrained unless explicitly required.

Mitigation generally focuses on preserving trust boundaries between HTTP metadata and configuration files. Header values should be treated as untrusted, with control characters rejected or safely normalized before any persistence. Configuration writers should use structured serialization rather than line-oriented string concatenation, and security-sensitive environment values should not be derived directly from request- or response-controlled data. Strict allowlists, immutable configuration paths, key rotation procedures, and least-privilege control panel roles can reduce exposure. Template and callback execution should also remain disabled or tightly constrained unless explicitly required.

How teams detect issues like this

Detection can include static analysis for writes that concatenate HTTP header values into dotenv or other configuration formats, together with checks for missing control-character validation. Code review should examine trust-boundary crossings, security-key assignment, signed redirect generation, and any configuration reload following header processing. Runtime monitoring can alert on unexpected changes to environment files, security keys, or signed authentication artifacts. Policy enforcement in CI can require allowlisted header values and review of code that persists externally influenced data.

Detection can include static analysis for writes that concatenate HTTP header values into dotenv or other configuration formats, together with checks for missing control-character validation. Code review should examine trust-boundary crossings, security-key assignment, signed redirect generation, and any configuration reload following header processing. Runtime monitoring can alert on unexpected changes to environment files, security keys, or signed authentication artifacts. Policy enforcement in CI can require allowlisted header values and review of code that persists externally influenced data.

Sources

SourceLink
github.comgithub.com/craftcms/cms
github.comgithub.com/craftcms/cms/releases/tag/5.11.2
github.comgithub.com/craftcms/cms/security/advisories/GHSA-9hp6-3565-gvh5
hckrt.comhckrt.com/hacktivity/HCKRT-WM3VSE

Frequently asked

questions

An authenticated control panel user with accessCp permission may be able to

reach the vulnerable processing path; administrative privileges are not

necessarily required.

No. The relevant access is through the authenticated control panel workflow,

although deployment-specific authorization and feature configuration affect

practical exploitability.

Reject or safely normalize control characters in header values, avoid using

externally influenced data to construct environment files, and protect

security-sensitive configuration from runtime modification.

Enforce strict schemas and allowlists at trust boundaries, use structured

configuration writers, apply least privilege, monitor sensitive configuration

changes, and review all code that converts protocol metadata into executable

configuration.

An authenticated control panel user with accessCp permission may be able to

reach the vulnerable processing path; administrative privileges are not

necessarily required.

No. The relevant access is through the authenticated control panel workflow,

although deployment-specific authorization and feature configuration affect

practical exploitability.

Reject or safely normalize control characters in header values, avoid using

externally influenced data to construct environment files, and protect

security-sensitive configuration from runtime modification.

Enforce strict schemas and allowlists at trust boundaries, use structured

configuration writers, apply least privilege, monitor sensitive configuration

changes, and review all code that converts protocol metadata into executable

configuration.

Find out what's already
exploitable in your codebase.