Skip to content
Heist/ feed
Back to feed
High

CI4MS has an .env CRLF Injection via Unvalidated `host` Parameter in Install Controller

Type: advisorySources: OSV

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.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2026-39394
Confirmed fixed CVEs
Not specified
Updated in this feed
7 Nov 2026, 05:56 UTC · Revision 1

Source evidence

CI4MS has an .env CRLF Injection via Unvalidated `host` Parameter in Install Controller

core-osv · Original source

Published 8 Apr 2026, 14:32 UTC

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.

osv:CVE-2026-39394
Complete source record
{
  "id": "06efe4b2f20b3274dce7ed71d64ae53c9280e64d7da806a9720afaa656de44fb",
  "url": "https://osv.dev/vulnerability/CVE-2026-39394",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "CI4MS has an .env CRLF Injection via Unvalidated `host` Parameter in Install Controller",
    "summary": "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.",
    "evidence": "osv:CVE-2026-39394",
    "products": [],
    "severity": "high",
    "structured": {
      "id": "CVE-2026-39394",
      "aliases": [
        "CVE-2026-39394",
        "GHSA-vfhx-5459-qhqh"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/ci4-cms-erp/ci4ms",
              "type": "GIT",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "379ebb6022883c1bc01dba9db3c19ff29c46b7dd"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "range": [
                      {
                        "introduced": "0"
                      },
                      {
                        "fixed": "0.31.4.0"
                      }
                    ],
                    "source": "AFFECTED_FIELD",
                    "strategy": "StringRangeExpression"
                  },
                  {
                    "cpe": "cpe:2.3:a:ci4-cms-erp:ci4ms:*:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "0"
                      },
                      {
                        "fixed": "0.31.4.0"
                      }
                    ],
                    "source": "CPE_RANGE"
                  }
                ]
              }
            }
          ],
          "versions": [
            "0.31.3.0",
            "0.31.2.0",
            "0.31.1.0",
            "0.31.0.0",
            "0.28.6.0",
            "0.28.5.0",
            "0.28.4.0",
            "0.28.3.0",
            "0.28.0.0",
            "0.27.0.0",
            "0.26.3.4",
            "0.26.3.3",
            "0.26.3.2",
            "0.26.3.1",
            "0.26.3.0",
            "0.26.2.0",
            "0.26.1.0",
            "0.26.0.0",
            "0.25.3.0",
            "0.25.2.0",
            "0.25.1.0",
            "0.25.0.43",
            "0.25.0.39",
            "0.25.0.30",
            "0.25.0.2",
            "0.25.0.1",
            "0.25.0.0",
            "0.24.0.60",
            "0.24.0.45",
            "0.24.0.42",
            "0.24.0.27",
            "0.24.0.20",
            "0.24.0.19",
            "0.24.0.18",
            "0.24.0.16",
            "0.24.0.0",
            "0.23.1.0",
            "0.23.0.0",
            "0.21.3.7",
            "0.21.3.6",
            "0.21.3.5",
            "0.21.3.4",
            "0.21.3.3",
            "0.21.3.2",
            "0.21.3.1",
            "0.21.3",
            "0.21.2",
            "0.21.1",
            "0.21.0"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-39394.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:49.807576943Z",
      "provider": "osv",
      "references": [
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/39xxx/CVE-2026-39394.json",
        "https://github.com/ci4-cms-erp/ci4ms/security/advisories/GHSA-vfhx-5459-qhqh",
        "https://nvd.nist.gov/vuln/detail/CVE-2026-39394"
      ],
      "provider_metadata": {
        "cwe_ids": [
          "CWE-93"
        ],
        "cna_assigner": "GitHub_M",
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/39xxx/CVE-2026-39394.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2026-39394",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 518414,
  "published_at": "2026-04-08T14:32:31.68+00:00"
}