CVE-2026-25494: Craft has a SSRF in GraphQL Asset Mutation via Alternative IP Notation
Craft is a platform for creating digital experiences. In Craft versions 4.0.0-RC1 through 4.16.17 and 5.0.0-RC1 through 5.8.21, the saveAsset GraphQL mutation uses filtervar(..., FILTERVALIDATEIP) to block a specific list of IP addresses. However, alternative IP notations (hexadecimal, mixed) are not recognized by this function, allowing attackers to bypass the blocklist and access cloud metadata services. This issue is patched in versions 4.16.18 and 5.8.22.
Other sources
I observed a recent commit intended to mitigate Server-Side Request Forgery (SSRF) vulnerabilities. While the implemented defense mechanisms are an improvement, I have identified two methods to bypass these protections. This report details the first bypass method involving alternative IP notation, while the second method will be submitted in a separate advisory.
--- Summary
The saveAsset GraphQL mutation uses filtervar(..., FILTERVALIDATEIP) to block a specific list of IP addresses. However, alternative IP notations (hexadecimal, mixed) are not recognized by this function, allowing attackers to bypass the blocklist and access cloud metadata services.
--- Proof of Concept 1. Send the following GraphQL mutation: graphql mutation { saveimagesAsset(file: { url: "http://169.254.0xa9fe/latest/meta-data/" filename: "metadata.txt" }) { id } } 2. The IP validation passes (hex notation not recognized as IP) 3. Guzzle resolves 169.254.0xa9fe to 169.254.169.254 4. Cloud metadata is fetched and saved
Alternative Payloads | Payload | Notation | Resolves To | |---------|----------|-------------| | http://169.254.0xa9fe/ | Mixed (decimal + hex) | 169.254.169.254 | | http://0xa9.0xfe.0xa9.0xfe/ | Full hex dotted | 169.254.169.254 | | http://0xa9fea9fe/ | Single hex integer | 169.254.169.254 |
--- Technical Details
File: src/gql/resolvers/mutations/Asset.php Root Cause: filtervar($hostname, FILTERVALIDATEIP) only recognizes standard dotted-decimal notation. Hex representations bypass this check, but Guzzle still resolves them.
php // Line 287 - Fails to catch hex notation filtervar($hostname, FILTERVALIDATEIP)
— GitHub
Affected Software
Remediation
Event History
Frequently Asked Questions
What is the severity of CVE-2026-25494?
CVE-2026-25494 is classified as a high-severity vulnerability due to its potential for server-side request forgery (SSRF).
How do I fix CVE-2026-25494?
To fix CVE-2026-25494, upgrade Craft CMS to version 5.8.22 or later, or version 4.16.18 or later.
What versions of Craft are affected by CVE-2026-25494?
CVE-2026-25494 affects Craft versions 4.0.0-RC1 through 4.16.17 and 5.0.0-RC1 through 5.8.21.
What type of vulnerability is CVE-2026-25494?
CVE-2026-25494 is a server-side request forgery (SSRF) vulnerability found in the GraphQL Asset Mutation functionality.
Is there a specific function in Craft that is vulnerable to CVE-2026-25494?
Yes, the saveAsset GraphQL mutation in Craft is the specific function that is vulnerable to CVE-2026-25494.