Actively exploited in the wild. This CVE is on the CISA Known Exploited Vulnerabilities list — treat remediation as urgent. Federal remediation due by 23 Jun 2025.
Craft CmsApplication · Craftcms

CVE-2025-35939

MEDIUM · 5.3 CVSS v3.1 Published 2025-05-07
Fix available
A fix is available. Upgrade to 4.15.3 / 5.7.5 or later.
See remediation →
100/100
Remediation priority · Urgent
In the wild Remotely reachable No privileges Zero-click Patch available

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 · unedited
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.

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 confidence

Craft 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.

MitigationUpgrade 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.

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
Craft CmsApplication
Affected:< 4.15.3>= 5.0.0, < 5.7.5

CVSS 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 checks

Work through these to decide whether this CVE applies to you.

  1. Check installed Craft CMS version
    Locate 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 version
    Affected if Version is less than 4.15.3, or greater than or equal to 5.0.0 but less than 5.7.5
  2. Verify PHP session handling is enabled
    Check php.ini for session.save_path setting, or run 'php -i | grep session.save_path' to see where session files are stored
    Affected if PHP sessions are enabled and session files are stored in the default /var/lib/php/sessions or similar predictable location
  3. Check if Craft CMS session configuration uses client-controlled values
    Examine the Craft CMS config/settings for sessionName or cookieName configuration. Inspect the session cookie value in browser dev tools
    Affected 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]
  4. Inspect session files for injected content
    List 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.

Check your environment

Paste your version and any relevant configuration and it will be compared against the affected criteria above. Do not include secrets or credentials.

AI-assisted, checked against the advisory. Informational, not a guarantee.

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 · scoped
Upgrade available Upgrade to 4.15.3 / 5.7.5 or later
Fixed in 4.15.35.7.5
Vendor patch github.com →
Interim mitigation

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.

Recommended fix High confidence

Craft CMS 4.15.3 (for 4.x branches) or Craft CMS 5.7.5 (for 5.x branches)

  1. Identify your current Craft CMS version by checking the version number in your installation
  2. If running Craft CMS 4.x (versions below 4.15.3), upgrade to version 4.15.3
  3. If running Craft CMS 5.x (versions 5.0.0 to below 5.7.5), upgrade to version 5.7.5
  4. After upgrading, clear any cached session files in the PHP session directory (/var/lib/php/sessions)
  5. Verify the upgrade was successful by checking the admin control panel version number
  6. Ensure your PHP session configuration has appropriate file permissions and consider rotating session identifiers
Caveat Security patch release; review the Craft CMS changelog for any deprecation notices relevant to your custom plugins or templates

Generated from the published advisory — verify against the referenced sources before acting.

Fix this in Craft Cms Exploited in the wild — priority engagement
  • Consultation1.0 h
  • Implementation2.0 h
  • Testing2.0 h
5.0 hours of engineering $860
Get it fixed fast

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 locally
dbcve dependency scanner

Check 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 sources

Practitioner notes

Contributed

Peer-ranked notes from engineers who’ve handled CVE-2025-35939 in production — separate from our analysis above.

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.

What this is

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.

What belongs here
  • 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