# CVE-2026-39394: CI4MS has an .env CRLF Injection via Unvalidated `host` Parameter in Install Controller

- Severity: High 8.1 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.54%, higher than 46% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2026-04-08T14:32:31.680Z
- Modified: 2026-07-24T21:10:00.143Z
- Also known as: GHSA-vfhx-5459-qhqh
- Weaknesses: CWE-93
- SSVC (CISA-ADP): exploitation poc, automatable no, technical impact total
- Assigned by: GitHub_M

## Description

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.

(As written by CVE List.)

## Affected

- ci4-cms-erp ci4ms: < 0.31.4.0; before 0.31.4.0
- ci4-cms-erp/ci4ms (Packagist): before 0.31.4.0

## Every score

- GitHub_M: CVSS:3.1 8.1 High `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H`
- GitHub: CVSS:3.1 8.1 High `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H`
- NVD: CVSS:3.1 9.8 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`

## References

- <https://github.com/ci4-cms-erp/ci4ms/security/advisories/GHSA-vfhx-5459-qhqh> (exploit, vendor-advisory, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2026-39394> (advisory)
- <https://github.com/ci4-cms-erp/ci4ms> (package)
- <https://github.com/ci4-cms-erp/ci4ms/releases/tag/0.31.4.0> (web)

## Sources

- CVE List: [CVE-2026-39394](https://www.cve.org/CVERecord?id=CVE-2026-39394), CVE Terms of Use, modified 2026-04-08
- GitHub Advisory Database: [GHSA-vfhx-5459-qhqh](https://github.com/advisories/GHSA-vfhx-5459-qhqh), CC-BY-4.0, modified 2026-04-08
- NVD: [CVE-2026-39394](https://nvd.nist.gov/vuln/detail/CVE-2026-39394), Public domain, modified 2026-07-24

---

Page: https://cve.day/CVE-2026-39394 · Whole record: https://cve.day/CVE-2026-39394.json · Rebuilt by cve.day 2026-11-25T22:59:18.281Z
