CVE-2026-45138: ci4-cms-erp ci4ms stored XSS in Blog and Pages content

CVE-2026-45138 · Severity: medium · CVSS 5.4 · Published 2026-07-20

CI4MS is a content management system used to build and manage websites. A security flaw in how the system cleans up blog post content allows users with "editor" permissions to inject malicious scripts into the website. When other visitors or site administrators view these posts, the scripts execute in their browsers, potentially allowing attackers to steal administrator sessions, hijack accounts, or redirect visitors to malicious sites.

Technologies: Ci4ms, ci4-cms-erp/ci4ms (Packagist). Vendors: Ci4ms, Packagist.

Quick answers

Is CVE-2026-45138 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2026-45138 being exploited in the wild.
How severe is CVE-2026-45138?
Medium severity, with a CVSS score of 5.4, published 20 July 2026.
Which products and versions are affected?
Ci4ms < 0.31.9.0, <= 0.31.8.0; ci4-cms-erp/ci4ms (Packagist) <= 0.31.8.0, ECOSYSTEM:introduced=0,fixed=0.31.9.0.
Is there a fix for CVE-2026-45138?
Yes. ci4-cms-erp/ci4ms (Packagist): upgrade to 0.31.9.0 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is CVE-2026-45138 attacked?
It is attacked over the network, in a network appliance.
Am I affected by CVE-2026-45138?
Check whether you run Ci4ms or ci4-cms-erp/ci4ms (Packagist) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

How to fix

  • ci4-cms-erp/ci4ms (Packagist): upgrade to 0.31.9.0 or later
    composer require ci4-cms-erp/ci4ms:^0.31.9.0

Technical details

A stored cross-site scripting (XSS) vulnerability exists in CI4MS due to a flawed implementation of the custom `html_purify` validation rule. The rule attempts to sanitize input using by-reference mutation (`?string &$str`), but because the CodeIgniter 4 validator passes a local copy of the data, the sanitized output is discarded and the raw, malicious payload is persisted to the database. The vulnerability is present in the Blog and Pages controllers, where `$lanData['content']` is written directly to the database and subsequently rendered unescaped in public templates. An authenticated attacker with content-creation privileges can exploit this to execute arbitrary JavaScript in the context of any user, including superadmins, facilitating session hijacking and privilege escalation. The issue is resolved in version 0.31.9.0.

Affected products

  • ci4-cms-erp ci4ms < 0.31.9.0

Identifiers

  • CVE-2026-45138
  • GHSA-2m69-jmvh-6chr

Timeline

  • 2026-05-08: patched: Version 0.31.9.0 released
  • 2026-07-20: advisory: CVE-2026-45138 published

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.