Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessIdentify CI4MS installation endpoint
-
DeliveryMonitor for empty settings cache condition
-
ExploitCraft POST request with newline-injected host parameter
-
ExecutionBypass InstallFilter validation
-
PersistInject malicious directives into .env file
-
ImpactLeverage compromised configuration for database access
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization CRLF sequence sanitization
|
| Exploitation Conditions | Exploitation requires the InstallFilter to be bypassable, which occurs specifically when cache('settings') returns empty. This condition manifests during fresh CI4MS deployments before initial configuration is cached, after cache expiration based on application cache timeout settings, or following manual cache clearing operations (php spark cache:clear). The install routes (/install/*) must be network-accessible, which is typical during initial deployment but may be restricted post-installation depending on deployment practices. CSRF protection is intentionally disabled on these routes per the codebase design, eliminating that defensive barrier. Attack complexity is rated High (AC:H) because the attacker must successfully time their request during the narrow window when cache is empty and install routes remain accessible-not a persistent condition in production environments. No authentication is required (PR:N) and no user interaction needed (UI:N) once the timing condition is met. Exploitation is LIMITED by the ephemeral nature of the vulnerable state: production systems with populated settings cache and restricted install route access are not exploitable. The vulnerability primarily threatens systems during deployment phases, major configuration changes requiring cache clearing, or installations with misconfigured persistent cache backends that frequently expire. |
| Impact | Real-world risk assessment reveals conflicting signals requiring careful interpretation. CVSS 8.1 (High) with vector AV:N/AC:H/PR:N/UI:N indicates network-accessible unauthenticated exploitation but with high attack complexity. The AC:H rating is critical here: successful exploitation requires the InstallFilter to be bypassable (when cache('settings') is empty), which occurs during fresh deployments, after cache expiration, or manual cache clearing-not continuous availability. EPSS score of 0.02% (4th percentile) strongly suggests this vulnerability is NOT being actively exploited in the wild despite proof-of-concept availability (SSVC exploitation status: poc). The low EPSS contradicts the high CVSS, indicating that while technical impact is severe (SSVC: total-full system compromise possible), practical exploitation barriers are significant. SSVC indicates 'not automatable,' meaning exploitation requires attacker-specific timing and reconnaissance to identify vulnerable installation windows. No CISA KEV listing confirms no widespread or targeted campaign detected. Priority assessment: This is a defense-in-depth concern for organizations deploying CI4MS, not an immediate incident response trigger. Risk is elevated during initial deployment phases or after cache clearing events, requiring time-bound monitoring rather than emergency patching. Organizations not currently deploying new CI4MS instances face minimal immediate risk. |
| Exploit ScenarioDerived | An attacker discovers a CI4MS deployment during its initial installation phase or identifies a production instance where the settings cache has expired. They send a crafted HTTP POST request to the /install endpoint with a host parameter containing embedded newline characters followed by malicious configuration directives, such as host=legitimate.com\ndatabase.default.password=AttackerPass\nencryption.key=AttackerKey. Because CSRF protection is disabled on install routes and InstallFilter validation is bypassed due to empty cache, the malicious payload is written directly into the .env file via preg_replace(). The attacker then leverages the injected database credentials or encryption keys to gain full administrative access to the application database, decrypt sensitive user data, or modify application behavior by overriding critical configuration parameters. Proof-of-concept code exists demonstrating this attack path according to SSVC assessment. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv2 – Apr 16, 2026
Environment file injection in CI4MS versions prior to 0.31.4.0 allows remote attackers to inject arbitrary configuration directives by exploiting unvalidated newline characters in the host parameter during installation. The Install::index() controller's CSRF protection is intentionally disabled, and InstallFilter bypass is possible when settings cache expires or on fresh deployments. EPSS score of 0.02% (4th percentile) indicates low exploitation probability despite proof-of-concept availability (SSVC: poc). CVSS 8.1 reflects high potential impact but is tempered by high attack complexity (AC:H) requiring specific timing conditions.
Earlier versions of this analysis (1)
Environment variable injection in CI4MS CMS allows remote attackers to inject arbitrary configuration directives into the .env file during installation, potentially leading to full system compromise. Versions before 0.31.4.0 fail to sanitize newline characters in the host POST parameter, enabling attackers to bypass CSRF-disabled install routes and inject malicious configuration when InstallFilter validation fails. No public exploit identified at time of analysis, though EPSS exploitation probability warrants monitoring given the unauthenticated network attack vector.
RemediationAI
Upgrade to CI4MS version 0.31.4.0 or later immediately, as confirmed by the vendor release at https://github.com/ci4-cms-erp/ci4ms/releases/tag/0.31.4.0. Review the GitHub security advisory at https://github.com/ci4-cms-erp/ci4ms/security/advisories/GHSA-vfhx-5459-qhqh for implementation details of the fix, which sanitizes newline characters in the host parameter before .env file writes. For organizations unable to upgrade immediately, implement these compensating controls with noted trade-offs: (1) Restrict network access to installation routes (/install/*) using web application firewall rules or reverse proxy ACLs to only allow access from trusted administrator IP addresses during planned deployment windows-this prevents remote exploitation but requires strict change control for legitimate installations. (2) Manually populate the settings cache immediately after deployment using cache warming scripts to prevent InstallFilter bypass conditions-this reduces the attack window but does not eliminate risk if cache expires. (3) Monitor .env file integrity using file integrity monitoring (FIM) tools configured to alert on any modifications outside approved change windows-this provides detection but not prevention. After upgrading, audit existing .env files for injected malicious directives by comparing against known-good baseline configurations, particularly examining database connection strings, API keys, and application base URLs for anomalies.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 2 packages in composer, euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
CI4MS is a Content Management System skeleton built on the CodeIgniter 4 PHP framework, providing role-based access control and modular architecture. The vulnerability stems from CWE-93 (Improper Neutralization of CRLF Sequences in HTTP Headers), where the Install::index() controller method accepts a POST parameter named 'host' and passes it directly to updateEnvSettings() without sanitizing newline characters (\n or \r\n). The preg_replace() function then writes this unsanitized input into the .env environment configuration file, a critical file in CodeIgniter applications that stores database credentials, encryption keys, and application settings. Because .env files use newline-delimited key=value syntax, an attacker can inject \n characters followed by malicious directives (e.g., database.default.password=attacker_value\ndatabase.default.hostname=evil.com) to override legitimate configuration. The CPE identifier cpe:2.3:a:ci4-cms-erp:ci4ms confirms this affects the CI4MS product specifically, not the underlying CodeIgniter 4 framework itself.
Know when Ci4ms gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Primary rating from NVD · only source for this CVE.
CVSS VectorNVD
Lifecycle Timeline
5DescriptionNVD
CI4MS is a CodeIgniter 4-based CMS skeleton that delivers a production-ready, modular architecture with RBAC authorization and theme support. Prior to 0.31.4.0, the Install::index() controller reads the host POST parameter without any validation and passes it directly into updateEnvSettings(), which writes it into the .env file via preg_replace(). Because newline characters in the value are not stripped, an attacker can inject arbitrary configuration directives into the .env file. The install routes have CSRF protection explicitly disabled, and the InstallFilter can be bypassed when cache('settings') is empty (cache expiry or fresh deployment). This vulnerability is fixed in 0.31.4.0.
Executive ViewAI
CI4MS versions before 0.31.4.0 contain an environment file injection vulnerability in the installation controller that allows unauthenticated remote attackers to inject malicious configuration directives through unvalidated newline characters. This could enable attackers to modify application behavior, expose sensitive credentials, or escalate privileges on affected instances, particularly during initial deployment or when installation caches expire. Organizations running CI4MS should prioritize inventory and patching of affected versions, especially in pre-production and newly deployed environments.
Vendor-released patch: CI4MS 0.31.4.0. If immediate patching is not feasible: restrict network access to installation endpoints using Web Application Firewall rules to block requests containing newline characters (\n, \r) in host parameters; disable or restrict access to the /install path in production environments; implement continuous monitoring of .env file modifications and alert on any unauthorized changes.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Cross-Site Request Forgery exploits the automatic credential inclusion behavior of web browsers.
Related Vulnerabilities in CI4MS Multiple Vulnerabilities
View all 6CI4MS (CodeIgniter 4 CMS skeleton) has a code injection vulnerability (CVSS 9.9) allowing authenticated users to execute
Stored Cross-Site Scripting in CI4MS methods management allows authenticated users to inject malicious JavaScript into a
Stored cross-site scripting in CI4MS role/group management allows authenticated attackers to inject malicious JavaScript
Stored cross-site scripting in CI4MS before 0.31.2.0 allows an authenticated user with System Settings → Company Informa
Stored cross-site scripting in CI4MS backend user management allows authenticated attackers with low-level privileges to
Stored cross-site scripting in CI4MS blog category management allows authenticated users to inject malicious JavaScript
Stored cross-site scripting in CI4MS before 0.31.0.0 lets an authenticated user with blog create/edit rights save JavaSc
Stored cross-site scripting in CI4MS (CodeIgniter 4 CMS) allows authenticated users with blog post management privileges
Stored cross-site scripting (XSS) in CI4MS page management functionality allows authenticated attackers to inject malici
Stored cross-site scripting (XSS) in CI4MS menu management allows authenticated users with low privileges to inject mali
Stored cross-site scripting in CI4MS menu management allows authenticated attackers to inject malicious scripts that exe
Stored blind cross-site scripting in CI4MS backup management allows authenticated attackers to inject malicious JavaScri
EUVD-2026-20489
GHSA-vfhx-5459-qhqh
NVD
CVE.org
EPSS
Vulnrichment
Exploit-DB