# CVE-2026-27128: Craft CMS's race condition in Token Service potentially allows for token usage greater than the token limit

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** MEDIUM 6.9
- **CVSS:** 6.9 (v4.0, CNA) `CVSS:4.0/AV:N/AC:H/AT:P/PR:H/UI:N/VC:H/VI:N/VA:N/SC:H/SI:N/SA:N`
- **CVSS metrics:** Attack vector: Network; Attack complexity: High; Attack requirements: Present; Privileges required: High; User interaction: None; Confidentiality impact: High; Integrity impact: None; Availability impact: None; Confidentiality impact on other systems: High; Integrity impact on other systems: None; Availability impact on other systems: None
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Remote, login needed
- **EPSS:** 0.25% (percentile 10, 2026-11-26)
- **CWE:** CWE-367
- **Aliases:** GHSA-6fx5-5cw5-4897
- **Published:** 2026-02-23T22:16:22.000Z
- **Modified:** 2026-06-17T10:26:43.020Z

## Who should check

- Projects that depend on Packagist package craftcms/cms (\>= 4.5.0-RC1, \< 4.16.19)
- Anyone running craftcms cms \>= 4.5.0-RC1, \< 4.16.19; \>= 5.0.0-RC1, \< 5.8.23

## Description

Craft is a content management system (CMS). In versions 4.5.0-RC1 through 4.16.18 and 5.0.0-RC1 through 5.8.22, a Time-of-Check-Time-of-Use (TOCTOU) race condition exists in Craft CMS’s token validation service for tokens that explicitly set a limited usage. The \`getTokenRoute()\` method reads a token’s usage count, checks if it’s within limits, then updates the database in separate non-atomic operations. By sending concurrent requests, an attacker can use a single-use impersonation token multiple times before the database update completes. To make this work, an attacker needs to obtain a valid user account impersonation URL with a non-expired token via some other means and exploit a race condition while bypassing any rate-limiting rules in place. For this to be a privilege escalation, the impersonation URL must include a token for a user account with more permissions than the current user. Versions 4.16.19 and 5.8.23 patch the issue.

## Affected and fixed versions

- Packagist `craftcms/cms`: affected \>= 4.5.0-RC1, \< 4.16.19; fixed 4.16.19, 5.8.23 (osv)
- craftcms cms: \>= 4.5.0-RC1, \< 4.16.19; \>= 5.0.0-RC1, \< 5.8.23 (cvelist)

## Mitigation

- Upgrade craftcms/cms to one of 4.16.19, 5.8.23 (or later in the same release line).

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2026-27128. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2026-27128.md
Affected: craftcms/cms >= 4.5.0-RC1, < 4.16.19
Fixed in: 4.16.19, 5.8.23

Steps:
1. Search this machine and project for craftcms/cms (Packagist), craftcms cms: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2026-27128 being exploited?

There is no confirmed exploitation: CVE-2026-27128 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.25% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2026-27128?

Medium: CVSS 6.9 (v4.0, scored by CNA). Remote, login needed. The attack needs conditions outside the attacker's control, which makes it harder.

### Which versions are affected by CVE-2026-27128?

craftcms/cms \>= 4.5.0-RC1, \< 4.16.19.

### Is there a fix for CVE-2026-27128?

Yes. Fixed in 4.16.19, 5.8.23. Upgrade craftcms/cms to one of 4.16.19, 5.8.23 (or later in the same release line).

### How do I check if I'm affected by CVE-2026-27128?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- vendor: <https://github.com/craftcms/cms/security/advisories/GHSA-6fx5-5cw5-4897>
- vendor: <https://nvd.nist.gov/vuln/detail/CVE-2026-27128>
- patch: <https://github.com/craftcms/cms/commit/3e4afe18279951c024c64896aa2b93cda6d95fdf>
- other: <https://github.com/craftcms/cms>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2026-27128>
- OSV: CC-BY 4.0 <https://osv.dev/vulnerability/GHSA-6fx5-5cw5-4897> (license: <https://creativecommons.org/licenses/by/4.0/>)

HTML: <https://flawdb.com/CVE-2026-27128> · JSON: <https://flawdb.com/api/v1/entries/CVE-2026-27128>
