{"answers":{"affected":"2 open source packages ship an affected version, including ci4-cms-erp/ci4ms.","exploited":"It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-45138 exists.","fix":"Upgrade ci4-cms-erp/ci4ms to 0.31.9.0 or later.","what":"CVE-2026-45138 is a medium-severity cross-site scripting vulnerability in ci4-cms-erp ci4ms, published on 19 Jul 2026. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link."},"fix_prompt":"Check this codebase for CVE-2026-45138 and fix it if it is affected.\n\nWhat it is: CVE-2026-45138 is a medium-severity cross-site scripting vulnerability in ci4-cms-erp ci4ms, published on 19 Jul 2026. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link.\nExploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-45138 exists.\n\nAffected packages and fixed versions:\n- ci4-cms-erp/ci4ms (Packagist): affected all versions; fixed in 0.31.9.0\n- ci4-cms-erp/ci4ms (Packagist): affected all versions; fixed in 0.31.9.0\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2026-45138/ (Markdown: https://insights.sbomify.com/CVE-2026-45138/index.md)","id":"CVE-2026-45138","markdown":"https://insights.sbomify.com/CVE-2026-45138/index.md","name":"CVE-2026-45138","record":{"aliases":["GHSA-2m69-jmvh-6chr"],"analysis":{"component_type":"web_application","fix_type":"patch","impacts":["code_execution","account_takeover"],"network_reachable":"yes","non_default_config":false,"product_category":"CodeIgniter CMS skeleton","requires_auth":"low_privilege","summary":"Stored XSS in CI4MS blog content allows attackers to execute scripts in visitors' browsers, including admins, due to broken sanitization.","user_interaction":"required","vuln_class":"xss"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[],"cvss":{"score":5.4,"severity":"medium","source":"cna","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N","version":"3.1"},"cwes":[{"id":"CWE-79","name":"Improper Neutralization of Input During Web Page Generation"}],"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 \u0026$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.","ecosystems":["Packagist"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"weaponised"},"has_fix":true,"headline":"CI4MS: Stored XSS in Blog Content via Broken `html_purify` Validation Rule","id":"CVE-2026-45138","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"Packagist","product":null,"products":[],"type":"xss","year":"2026"},"n_packages":2,"n_references":2,"next":{"headline":"CI4MS Fileeditor allows deletion and rename of critical application files due to missing extension allowlist on destructive operations","id":"CVE-2026-45139"},"packages":[{"ecosystem":"Packagist","fixed":["0.31.9.0"],"introduced":["0"],"last_affected":[],"package":"ci4-cms-erp/ci4ms","purl":null,"source":"GHSA-2m69-jmvh-6chr"},{"ecosystem":"Packagist","fixed":["0.31.9.0"],"introduced":["0"],"last_affected":[],"package":"ci4-cms-erp/ci4ms","purl":"pkg:composer/ci4-cms-erp/ci4ms","source":"GHSA-2m69-jmvh-6chr"}],"prev":{"headline":"Anchor: Program\u003c'info, System\u003e is not properly validated","id":"CVE-2026-45137"},"products":["ci4ms"],"published":"2026-07-19","related":[],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"no","exploitation":"poc","technical_impact":"partial"},"state":"PUBLISHED","updated":"2026-07-20","vendors":["ci4-cms-erp"]},"summary":"Stored XSS in CI4MS blog content allows attackers to execute scripts in visitors' browsers, including admins, due to broken sanitization.","url":"https://insights.sbomify.com/CVE-2026-45138/"}