Vulnerability · Published Jul 19, 2026 · Assigned by GitHub_M
CVE-2026-45138CI4MS: Stored XSS in Blog Content via Broken `html_purify` Validation Rule
Medium 5.4
In plain English
A medium-severity cross-site scripting in ci4ms from ci4-cms-erp. Proof-of-concept exploit code is public. The chance it is exploited in the next 30 days is estimated at 0.2% (higher than 7% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official description
CI4MS is a CodeIgniter 4-based content management system skeleton. Prior to version 0.31.9.0, the custom `html_purify` validation rule used to sanitize blog post bodies relies on by-reference mutation (`?string &$str`), but CodeIgniter 4's validator passes a local copy of the value, so the sanitized text is silently discarded. The Blog controller writes `$lanData['content']` directly into `blog_langs.content`, and the public template echoes it without escaping — yielding stored XSS executable in any visitor's browser, including the superadmin when previewing or editing posts. Version 0.31.9.0 patches the issue.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Packagist | ci4-cms-erp/ci4ms | 0.31.9.0 | GHSA-2m69-jmvh-6chr |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| ci4-cms-erp | ci4ms | < 0.31.9.0 |
Weakness: CWE-79 · Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N
References
- https://github.com/ci4-cms-erp/ci4ms/security/advisories/GHSA-2m69-jmvh-6chr x_refsource_CONFIRM
- https://github.com/ci4-cms-erp/ci4ms/releases/tag/0.31.9.0 x_refsource_MISC