CVE-2025-68437
PHP vulnerability analysis and mitigation

Overview

CVE-2025-68437 is a Server-Side Request Forgery (SSRF) vulnerability in Craft CMS affecting the GraphQL save_<VolumeName>_Asset mutation. It was published on January 3, 2026, and affects Craft CMS versions 3.5.0 through 4.16.16 and 5.0.0-RC1 through 5.8.20. The vulnerability was discovered by researcher mHe4am and disclosed via GitHub Security Advisory GHSA-x27p-wfqw-hfcc. It carries a CVSS v3.1 base score of 6.8 (Medium) and a CVSS v4.0 base score of 5.0 (Medium) (Github Advisory, Craft CMS Advisory).

Technical details

The root cause is CWE-918 (Server-Side Request Forgery), arising from insufficient validation of the url parameter within the _file input of the GraphQL save_<VolumeName>_Asset mutation, implemented in src/gql/resolvers/mutations/Asset.php (Craft CMS Advisory). When a URL is supplied, the server fetches the remote content and saves it as an asset without validating whether the hostname resolves to an internal IP address or restricted endpoint. The patch (commit 013db63) addresses this by adding hostname validation that rejects IP addresses and non-alphanumeric hostnames using PHP's filter_var with FILTER_VALIDATE_DOMAIN and FILTER_VALIDATE_IP (Patch Commit). Exploitation requires the attacker to hold GraphQL schema permissions for "Edit assets" and "Create assets" in the targeted volume (Github Advisory).

Impact

Successful exploitation allows an authenticated attacker with GraphQL asset management permissions to force the Craft CMS server to make HTTP requests to arbitrary internal or external URLs, with the fetched content saved as an accessible asset (Craft CMS Advisory). In cloud-hosted environments (AWS, GCP, Azure), this can enable theft of sensitive credentials such as IAM role tokens and service account keys from instance metadata endpoints (e.g., http://169.254.169.254/), potentially leading to full infrastructure compromise. The vulnerability also enables internal network reconnaissance, bypassing firewall rules to probe services not exposed to the internet, and exfiltration of sensitive data from internal systems (Github Advisory).

Exploitability

A proof-of-concept exploit is publicly documented in the GitHub Security Advisory, demonstrating the attack via a GraphQL mutation targeting http://127.0.0.1:80/index.php (Craft CMS Advisory). There is no evidence of active in-the-wild exploitation at this time, and no threat actor attribution has been reported (Github Advisory). The EPSS score is approximately 0.016% (4th percentile), indicating a low near-term exploitation probability. The vulnerability is not listed in the CISA Known Exploited Vulnerabilities (KEV) catalog. Exploitation is constrained by the requirement for high privileges (GraphQL asset management permissions), limiting the attacker pool.

Exploitation steps

  1. Obtain GraphQL Credentials: Acquire an account or API token with GraphQL schema permissions for "Edit assets in the volume" and "Create assets in the volume" on the target Craft CMS instance.
  2. Identify Target Volume: Enumerate available GraphQL volumes on the target instance to determine the correct <VolumeName> for the mutation.
  3. Access GraphiQL or API Endpoint: Navigate to the GraphiQL interface (e.g., http://craft.local/admin/graphiql) or send requests directly to the GraphQL API endpoint using the authenticated session or token.
  4. Craft Malicious Mutation: Construct a GraphQL mutation targeting an internal resource or cloud metadata endpoint, for example:
mutation {
  save_<VolumeName>_Asset(_file: {
    url: "http://169.254.169.254/latest/meta-data/iam/security-credentials/"
    filename: "metadata.txt"
  }) {
    id
  }
}
  1. Retrieve Saved Asset: After the mutation executes, the server fetches the content from the specified URL and saves it as an asset. Access the asset via the Craft CMS asset preview or download functionality to read the exfiltrated content.
  2. Escalate: Use retrieved cloud credentials (e.g., IAM tokens) or internal service data to pivot further into the infrastructure (Craft CMS Advisory, Github Advisory).

Indicators of compromise

  • Network: Outbound HTTP requests from the Craft CMS server to internal IP ranges (e.g., 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16) or cloud metadata endpoints (169.254.169.254, fd00:ec2::254); unexpected outbound connections to internal services not normally accessed by the web application.
  • Logs: GraphQL API access logs showing save_<VolumeName>_Asset mutations with url parameters containing IP addresses, localhost, or 127.0.0.1; Craft CMS application logs recording asset creation events with unusual source URLs.
  • File System: Newly created asset files in Craft CMS volumes with names like poc.txt, metadata.txt, or other unexpected filenames containing internal service responses or cloud credential data.
  • Application: Asset records in the Craft CMS database with url fields pointing to internal addresses or metadata endpoints; assets with content inconsistent with expected media types (e.g., text files containing JSON credential data) (Craft CMS Advisory).

Mitigation and workarounds

Update Craft CMS to the patched versions: 5.8.21 or later for the 5.x branch, and 4.16.17 or later for the 4.x branch (users on 3.5.0+ should upgrade to 4.16.17 or 5.8.21) (Github Advisory, Patch Commit). As a configuration-level workaround, restrict GraphQL schema permissions for asset management to only fully trusted users, and consider disabling the save_<VolumeName>_Asset mutation if it is not required for operations. Additionally, implement network-level egress controls on the application server to block outbound requests to internal IP ranges and cloud metadata endpoints (e.g., 169.254.169.254).

Additional resources


SourceThis report was generated using AI

Related PHP vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

GHSA-wg23-69c2-gjc8CRITICAL9.1
  • PHP logoPHP
  • craftcms/cms
NoYesAug 07, 2026
CVE-2026-71488HIGH7.5
  • PHP logoPHP
  • commonmark
NoYesAug 06, 2026
CVE-2026-62996MEDIUM6.9
  • PHP logoPHP
  • smarty/smarty
NoYesAug 07, 2026
CVE-2026-62992MEDIUM6.9
  • PHP logoPHP
  • smarty/smarty
NoYesAug 07, 2026
CVE-2026-71478MEDIUM6.1
  • PHP logoPHP
  • commonmark
NoYesAug 06, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management