CVE-2026-45138

CI4MS: Stored XSS in Blog Content via Broken `html_purify` Validation Rule

Published Jul 19, 2026 CVSS 3.1 · 5.4 Medium EPSS < 1% KEV · Not listed
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.

Analysis

AI-generated

Technical impact

A flaw in CI4MS’s custom `html_purify` validation rule prevented proper sanitization of blog post bodies. The rule expects to modify its argument in place, but CodeIgniter 4’s validator supplies a local copy, so the sanitized text is silently discarded. Because the Blog controller writes `$lanData['content']` straight into the database and the public template echoes that field without escaping, any HTML or JavaScript stored in a post is rendered unchanged and executed in the browser of every visitor, including the superadmin when previewing or editing. This stored cross‑site scripting (CWE‑79) can be used to steal session cookies, deface the site, or otherwise compromise client‑side confidentiality and integrity.

Affected Systems

The affected product is CI4MS, a CodeIgniter 4 based CMS skeleton produced by ci4-cms-erp. All installations using a version earlier than 0.31.9.0 are vulnerable. The patch is included in the 0.31.9.0 release and later versions.

Risk and Exploitability

The CVSS score of 5.4 classifies the issue as moderate severity, while the EPSS score of < 1 % indicates a very low likelihood of exploitation. The vulnerability is not listed in CISA’s KEV catalog. Based on the description, it is inferred that an attacker needs access to the blog post editor or a user with posting privileges to insert malicious content, after which any visitor to the site will execute the payload in their browser. The impact is limited to client‑side script execution, but it can lead to credential theft, session hijacking, or data exfiltration.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade CI4MS to version 0.31.9.0 or later to apply the proper sanitization fix.
  • If an immediate upgrade is not possible, restrict blog posting privileges to trusted users only and monitor for injected scripts.
  • Review and cleanse existing blog posts for any malicious HTML or script tags that may have been stored before the patch.

Generated by OpenCVE AI on August 1, 2026 at 07:23 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-2m69-jmvh-6chr CI4MS: Stored XSS in Blog Content via Broken `html_purify` Validation Rule
History
Type Values Removed Values Added
First Time appeared Ci4-cms-erp
Ci4-cms-erp ci4ms
Vendors & Products Ci4-cms-erp
Ci4-cms-erp ci4ms
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'poc', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
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.
Title CI4MS: Stored XSS in Blog Content via Broken `html_purify` Validation Rule
Weaknesses CWE-79
References
Metrics cvssV3_1

{'score': 5.4, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N'}

Weaknesses
  • CWE-79

    Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Jul 20, 2026, 1:18 PM
Reserved
May 8, 2026, 8:44 PM
Status
Deferred
Published
Jul 20, 2026, 12:16 AM
Modified
Oct 24, 2026, 8:10 PM