# CVE-2025-35939: Craft CMS stores user-provided content in session files

> 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:L/AT:N/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N`
- **CVSS metrics:** Attack vector: Network; Attack complexity: Low; Attack requirements: None; Privileges required: None; User interaction: None; Confidentiality impact: None; Integrity impact: Low; Availability impact: None; Confidentiality impact on other systems: None; Integrity impact on other systems: None; Availability impact on other systems: None
- **Exploited in the wild:** Yes: in CISA KEV since 2025-06-02; federal due date 2025-06-23
- **Public exploit / PoC:** None known
- **Remote exploitation:** Remote, no login needed
- **EPSS:** 3.50% (percentile 89, 2026-12-01)
- **CWE:** CWE-472
- **Aliases:** GHSA-7vrx-9684-xrf2
- **Published:** 2025-05-07T22:41:29.728Z
- **Modified:** 2026-06-17T09:14:18.460Z

## Who should check

- Projects that depend on Packagist package craftcms/cms (\>= 5.0.0-alpha.1, \< 5.7.5)
- Anyone running Craft CMS \< 5.7.5; \< 4.15.3

## Description

Craft CMS stores arbitrary content provided by unauthenticated users in session files. This content could be accessed and executed, possibly using an independent vulnerability. Craft CMS redirects requests that require authentication to the login page and generates a session file on the server at '/var/lib/php/sessions'. Such session files are named 'sess\_\[session\_value\]', where '\[session\_value\]' is provided to the client in a 'Set-Cookie' response header. Craft CMS stores the return URL requested by the client without sanitizing parameters. Consequently, an unauthenticated client can introduce arbitrary values, such as PHP code, to a known local file location on the server. Craft CMS versions 5.7.5 and 4.15.3 have been released to address this issue.

## Affected and fixed versions

- Packagist `craftcms/cms`: affected \>= 5.0.0-alpha.1, \< 5.7.5; fixed 5.7.5, 4.15.3 (osv)
- Craft CMS: \< 5.7.5; \< 4.15.3 (cvelist)

## Mitigation

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

## Timeline

- 2025-05-07: Published
- 2025-06-02: Added to CISA KEV (exploited in the wild)
- 2025-06-23: CISA remediation due date for US federal agencies
- 2026-06-17: Last modified

## Check your systems with an agent

Paste this into a coding agent:

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

Details: https://flawdb.com/CVE-2025-35939.md
Affected: craftcms/cms >= 5.0.0-alpha.1, < 5.7.5
Fixed in: 5.7.5, 4.15.3

Steps:
1. Search this machine and project for craftcms/cms (Packagist), Craft 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-2025-35939 being exploited?

Yes. CISA lists CVE-2025-35939 in its Known Exploited Vulnerabilities catalog since 2025-06-02, which means attacks have been seen. No public exploit code is known. EPSS estimates a 3.50% chance of exploitation in the next 30 days (as of 2026-12-01).

### How serious is CVE-2025-35939?

Medium: CVSS 6.9 (v4.0, scored by CNA). Remote, no login needed.

### Which versions are affected by CVE-2025-35939?

craftcms/cms \>= 5.0.0-alpha.1, \< 5.7.5.

### Is there a fix for CVE-2025-35939?

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

### How do I check if I'm affected by CVE-2025-35939?

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://nvd.nist.gov/vuln/detail/CVE-2025-35939>
- patch: <https://github.com/craftcms/cms/pull/17220>
- patch: <https://github.com/craftcms/cms/commit/e4c7bac8f31010aee048409f9ef6f744a83146b2>
- other: <https://github.com/craftcms/cms/releases/tag/4.15.3>
- other: <https://github.com/craftcms/cms/releases/tag/5.7.5>
- other: <https://www.cve.org/CVERecord?id=CVE-2025-35939>
- other: <https://raw.githubusercontent.com/cisagov/CSAF/develop/csaf_files/IT/white/2025/va-25-147-01.json>
- other: <https://www.cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2025-35939>
- 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-2025-35939>
- OSV: CC-BY 4.0 <https://osv.dev/vulnerability/GHSA-7vrx-9684-xrf2> (license: <https://creativecommons.org/licenses/by/4.0/>)
- CISA KEV: CISA Known Exploited Vulnerabilities Catalog <https://www.cisa.gov/known-exploited-vulnerabilities-catalog>

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