CVE-2025-35939
Official description Straight from the sourceThe vendor's or NVD's own wording, published unedited. Authoritative, but often terse — it says what broke, rarely what to do.
NVD · uneditedCraft 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.
Technical summary Written by usOur analysis, written from the advisory, the CVSS vector and the affected-version data. It adds context the advisory leaves out, and never invents facts that are not in the source.
dbcve analysis · high confidenceCraft CMS stores unauthenticated user input (the return URL parameter) in PHP session files at '/var/lib/php/sessions/sess_[session_value]' without sanitization. Since the session value is known from the Set-Cookie header, an attacker can inject arbitrary content including PHP code into a predictable local file location. Execution would require a separate vulnerability.
Verify against the referenced sources before acting — the references below are authoritative for this CVE, this summary is not.
Affected products & versions What the vendor confirmedThe version ranges the vendor confirmed as vulnerable. If your version sits inside a range here, treat yourself as exposed until you have upgraded.
NVD · CPE data< 4.15.3>= 5.0.0, < 5.7.5CVSS breakdown How the score is builtThe industry scoring standard. It rates how the flaw is reached, what it takes to exploit, and what an attacker gains — the score is derived from those, not the other way round.
From the vector- Attack vector
- Network
- Complexity
- Low
- Privileges
- None
- User interaction
- None
- Scope
- Unchanged
- Confidentiality
- None
- Integrity
- Low
- Availability
- None
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N
Am I affected? How to checkSteps we derive from the advisory and the affected-version data, so you can decide whether this CVE reaches your setup. They are a guide, not a scan — your own configuration is the authority.
dbcve checksWork through these to decide whether this CVE applies to you.
-
Check installed Craft CMS versionLocate the craft or composer.json file in the web root and read the 'version' field, or run 'composer show craftcms/cms' to get the installed versionAffected if Version is less than 4.15.3, or greater than or equal to 5.0.0 but less than 5.7.5
-
Verify PHP session handling is enabledCheck php.ini for session.save_path setting, or run 'php -i | grep session.save_path' to see where session files are storedAffected if PHP sessions are enabled and session files are stored in the default /var/lib/php/sessions or similar predictable location
-
Check if Craft CMS session configuration uses client-controlled valuesExamine the Craft CMS config/settings for sessionName or cookieName configuration. Inspect the session cookie value in browser dev toolsAffected if The session ID is derived directly from a cookie or parameter without server-side validation or if session files follow the pattern sess_[clientvalue]
-
Inspect session files for injected contentList files in the session directory (e.g., ls -la /var/lib/php/sessions) and examine a session file's contents using 'cat'Affected if Session files contain unexpected content such as URL strings, PHP code, or content from returnUrl parameters that you do not recognize
You are affected if your Craft CMS version is below 4.15.3 or between 5.0.0 and 5.7.5, AND PHP session files are stored in a predictable location accessible to the web server user.
Generated from the published advisory. Verify against your own configuration.
Remediation Closing itWhat it takes to close this. Where a vendor fix exists we point at it; where none exists we say so plainly, and can build one. Effort estimates are scoped from the advisory, not from your codebase.
dbcve · scoped4.15.35.7.5
Upgrade to Craft CMS version 5.7.5 (for v5) or 4.15.3 (for v4) which properly sanitizes the return URL parameter before storing it in session files.
Craft CMS 4.15.3 (for 4.x branches) or Craft CMS 5.7.5 (for 5.x branches)
- Identify your current Craft CMS version by checking the version number in your installation
- If running Craft CMS 4.x (versions below 4.15.3), upgrade to version 4.15.3
- If running Craft CMS 5.x (versions 5.0.0 to below 5.7.5), upgrade to version 5.7.5
- After upgrading, clear any cached session files in the PHP session directory (/var/lib/php/sessions)
- Verify the upgrade was successful by checking the admin control panel version number
- Ensure your PHP session configuration has appropriate file permissions and consider rotating session identifiers
Generated from the published advisory — verify against the referenced sources before acting.
- Consultation1.0 h
- Implementation2.0 h
- Testing2.0 h
An estimate, not a bill — we confirm scope with you before any work starts. Need it this week? Rush from $1,376.
Scan for this in your stack
Free · runs locallyCheck whether your project pulls in CVE-2025-35939 — or any other known-vulnerable package — straight from your lock files. Free and open source; it runs locally and uploads nothing.
References Go to the primary sourcePrimary sources — vendor advisories, patches and trackers. Where our summary and a reference disagree, the reference wins.
Primary sourcesPractitioner notes
ContributedPeer-ranked notes from engineers who’ve handled CVE-2025-35939 in production — separate from our analysis above.
The advisory tells you what broke. It rarely tells you what actually worked. If you’ve dealt with this one, that detail is what the next engineer is searching for.
- The version that genuinely resolved it — not the one the vendor claimed
- A config change or rule that shut the vector down
- A gotcha in the upgrade path that cost you an afternoon
No notes yet
Be the first to add a field note for this CVE — a mitigation you’ve verified, a version caveat, or a link to a working fix. Sign in above to contribute.
A place for practitioners to share what actually worked: a mitigation you’ve tested, a configuration change, a version- or environment-specific caveat, or a link to a verified patch. The most useful notes rise to the top as peers upvote them, so the signal stays high.
- Verified mitigations, workarounds, and config changes
- Version or environment caveats, and links to real fixes
- No weaponised exploit code, or anything meant to cause harm
- No spam, self-promotion, credentials, or personal data