Skip to main content
VulnerabilityPublished

CVE-2026-31858: craftcms cms · SQL Injection

Affects craftcms cmsSource CVE Database V5

0

Mentioned vulnerabilities

Not known to be exploited · CVSS 8.7 High : upgrade to 5.9.9 soon.

Data as of 26 Oct 2026, 13:47 UTC

CVSS 4.0 base score
8.7High
How severe the flaw is on the 0–10 CVSS scale.
EPSS
0.3% chance of exploitation in 30 days – higher than 29% of CVEsExploit Prediction Scoring System: the likelihood attackers will use this flaw soon.
Patch
Available – fixed in 5.9.9
CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N

Exploitation evidence

  1. Disclosed: evidence found.

    CVE published 11 Mar 2026

  2. Detectable: no evidence on record.

    No public nuclei template indexed

  3. Weaponised: no evidence on record.

    No public exploit code indexed in Metasploit or Exploit-DB

  4. Exploited in the wild: no evidence on record.

    Not in CISA KEV and no source reports exploitation

  5. Observed by OffSeq Mirage: no evidence on record.

    No attack traffic recorded by OffSeq Mirage sensors

A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 26 Oct 2026.

What to do

Upgrade craftcms/cms to 5.9.9.

Affected software

ProductAffectedFixed in
craftcmscmsAffected
  • >=5.0.0-RC1 <=5.9.8
Fixed in–
GitHubcraftcms/cmspkg:github/craftcms/cmsOther threatsAffected
  • <5.9.9
Fixed in
  • 5.9.9

Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.

AI-suggested

  1. Immediate upgrade to Craft CMS version 5.9.9 or later, where the vulnerability is patched.
  2. Restrict control panel access to trusted users only and enforce strong authentication mechanisms, such as multi-factor authentication, to reduce the risk of compromised accounts.
  3. Implement web application firewalls (WAFs) with custom rules to detect and block suspicious SQL injection patterns targeting criteria parameters in the CMS endpoints.
  4. Conduct regular security audits and code reviews to ensure all input validation and sanitization measures are consistently applied across all controllers and endpoints.
  5. Monitor logs for unusual query patterns or failed login attempts that may indicate exploitation attempts.
  6. Limit database user privileges used by the CMS to the minimum necessary, preventing execution of arbitrary commands beyond required operations.
  7. Educate CMS users about the risks of credential compromise and enforce strong password policies.
  8. Consider network segmentation to isolate CMS infrastructure from critical backend systems to limit lateral movement in case of compromise.

Description

Craft is a content management system (CMS). The ElementSearchController::actionSearch() endpoint is missing the unset() protection that was added to ElementIndexesController in CVE-2026-25495. The exact same SQL injection vulnerability (including criteria[orderBy], the original advisory vector) works on this controller because the fix was never applied to it. Any authenticated control panel user (no admin required) can inject arbitrary SQL via criteria[where], criteria[orderBy], or other query properties, and extract the full database contents via boolean-based blind injection. Users should update to the patched 5.9.9 release to mitigate the issue.

References

Community reviews

Loading reviews…