Summary
A critical code injection vulnerability in SPIP allows unauthenticated remote attackers to execute arbitrary code through specially handled HTTP request data.
The issue becomes risky when the X-Spip-Filtre header reaches analyse_resultat_skel without adequate separation between data and executable expressions. It has reportedly been exploited in the wild.
Affected context
The vulnerability affects SPIP deployments using releases before 4.4.21 where the X-Spip-Filtre HTTP request header is processed by analyse_resultat_skel. Risk is highest when the application is reachable from untrusted networks and request-header contents are allowed to influence dynamic processing without strict validation or safe interpretation.
Exploit preconditions
- Attack surface: Network-accessible SPIP HTTP endpoints
- Required access: No authentication is generally required
- Trigger point: Processing of an
X-Spip-Filtrerequest header byanalyse_resultat_skel - Why exploitation is possible: Attacker-controlled header data may reach a code-execution path without sufficient validation, escaping, or data-only interpretation
Why this happens
The underlying bug is a failure to treat HTTP header content strictly as untrusted data. Dynamic processing in analyse_resultat_skel can interpret attacker-influenced filter input as executable code rather than as constrained data, mapping to CWE-94: Improper Control of Generation of Code ('Code Injection'). The insecure pattern occurs when request-derived values cross into an interpreter or dynamic evaluation mechanism without a safe, narrowly defined representation.
Potential impact
- An unauthenticated attacker may execute arbitrary code in the SPIP process context
- The attacker could access or modify application content and configuration
- Server credentials, tokens, or other sensitive data may be exposed
- The compromised host could be used for persistence, malware deployment, or lateral movement
- Website integrity, availability, and visitor safety may be affected
General mitigation guidance
Mitigation generally focuses on removing dynamic code interpretation from request-processing paths and reducing trust in HTTP input.
Common defensive patterns include:
- Treating request headers exclusively as data and avoiding evaluation of their contents
- Replacing dynamic expression handling with allowlisted, parameterized operations
- Applying strict syntax, length, character, and type validation before processing headers
- Enforcing secure-by-default routing and filtering behavior for untrusted requests
- Running the application with least-privilege operating-system and database permissions
- Restricting outbound connectivity and sensitive filesystem access from the web process
- Applying compensating request-filtering policies at suitable network or application boundaries
- Reviewing exposed deployments against supported, security-maintained SPIP release guidance without relying on filtering alone
How teams detect issues like this
Detection can combine source review, runtime monitoring, and policy enforcement:
- Use static analysis to identify request-header values flowing into evaluators, template engines, interpreters, or dynamic function dispatch.
- Review code for unsafe concatenation of HTTP input into executable expressions or filter syntax.
- Monitor web logs and application telemetry for unusual
X-Spip-Filtreusage, unexpected request patterns, and anomalous response or process behavior. - Enforce security policies that flag dynamic evaluation of request-derived data and require allowlisted parsing.
- Use automated code-review or software-composition tools to identify dangerous data flows and vulnerable deployment components.

