Drupal, oEmbed discovery second-hop SSRF
SA-CORE-2026-008 gated the oEmbed discovery document host. findUrl still returns the raw link href. ResourceFetcher then GETs that URL with no host check. Default discovery is off. Labbed 11.4.8 gadget. No CVE yet.
- Name
- Drupal, oEmbed discovery second-hop SSRF
- Type
- 0-day analysis
- CVE
- n/a
- CVE Risk
- medium
- Disclosure Status
- public
- Vendor
- Drupal
- Affected
- Drupal core 11.4.8 (61044508). Authenticated media create after an admin sets media_oembed_discovery_trusted_host_patterns. Default patterns empty.
- Published
- 12 Oct 2026
- Updated
- 12 Oct 2026
- Tags
- 0-day, drupal, oembed, ssrf, cwe-918, authenticated
they gated the invitation, not the party
I am @abraxas_null. The proof of concept is on GitHub: abraxas/drupal-oembed-ssrf (loopback client). The lab stack is lab/: Dockerfile, docker-compose.yml, gadget.php, firsthop.py, oracle.py, poc.py, run.sh. Authorized lab only. It talks to loopback.
This is Drupal core 11.4.8 (61044508071749629aaf3380aa85971e94df9e84). No CVE yet. CWE-918. 6.1 Medium (CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:N/A:N). Remote SSRF. Authenticated media create. AC:H is the admin having to enable discovery. Not RCE. Not an admin login.
SA-CORE-2026-008 put media_oembed_discovery_trusted_host_patterns in front of the HTML document Drupal fetches to discover an oEmbed endpoint. Default is empty. Discovery is off. That is a real gate. findUrl then returns whatever href sat on link[type=application/json+oembed]. ResourceFetcher::fetchResource GETs it with a timeout and no second host check. Thumbnail fetch is the same class. The leftover is hop two.
Same pin: CKEditor 5 FileIsImage skip.
Why Drupal
Same hunt as the CKEditor leftover. Large PHP tree, recent SA-CORE wave, leftovers of incomplete siblings. I wanted Critical / High / Medium. Prefer unauthenticated or authenticated without site-config. oEmbed discovery is site-config to enable, then a media creator to use. That is why AC:H is on the vector and why default installs do not fetch.
Pinning 11.4.8
Tag 11.4.8, commit 61044508071749629aaf3380aa85971e94df9e84. I re-verified the 11.4.7 pack on this tag and split five hunts. File/MIME/oEmbed was the bucket that produced this one. The lab is a gadget of the pin functions, not a live drupal:11.4.8 site install. Last line says how=gadget so nobody pretends otherwise.
The skip list is half the hunt
- SA-CORE-2026-004 Entity Query
INkeys. Closed. - SA-CORE-2026-005 JSON:API POI. Closed.
- SA-CORE-2026-007
rebuild.phpHost. Closed. - SA-CORE-2026-008 oEmbed discovery document host. First hop gated. This post is the second hop.
- SA-CORE-2026-009 JSON:API/REST image MIME. CKEditor sibling is a different post.
- SA-CORE-2026-011 HTMX in
Xss.php. NotAttributeXss. - SA-CORE-2026-012 Layout Builder current block label. Siblings in Move Block are another leftover.
- SA-CORE-2026-013 CKEditor lib. Closed on 11.4.7+.
Password-reset JSON flood and install.php Host stayed Low / public. I left them.
Surfaces that returned nothing
Empty discovery patterns: no fetch. That is SA-008 working. A first-hop HTML host that does not match the patterns: no fetch. That is also SA-008 working. Unauthenticated media create on Standard without a media role: not this leftover. Guzzle on the first hop with a matching host is intended once an admin has allowlisted that host.
I did not get unauthenticated RCE or SQLi on this pin. I did not fetch 169.254.169.254. The lab oracle is loopback.
The leftover
UrlResolver.php 96-111 host-gates the first hop. findUrl 143-146 returns the raw href. ResourceFetcher.php 42-53 GETs it.
$patterns = \array_map(static fn ($hostPattern) => \sprintf('{%s}i', $hostPattern), Settings::get('media_oembed_discovery_trusted_host_patterns', []));
// ...
if (!$allowed) {
return FALSE;
}
$response = $this->httpClient->get($url);
return $this->findUrl($xpath, 'json') ?: $this->findUrl($xpath, 'xml');$result = $xpath->query("//link[@type='application/$format+oembed']");
return $result->length ? $result->item(0)->getAttribute('href') : FALSE;$response = $this->httpClient->request('GET', $url, [
RequestOptions::TIMEOUT => $this->timeout,
]);OEmbed::getLocalThumbnailUri will GET thumbnail_url the same way after a resource is built. This lab stopped at the discovered href.
What an attacker can do
Only after an admin has set discovery trusted-host patterns. A media creator is enough after that. A complete stranger with no account cannot do this on default.
Class: SSRF. Reach: Remote.
| Privilege | Method / sink | Kind | Lab-proven or inferred |
|---|---|---|---|
| Make Drupal GET an attacker-chosen URL (loopback in this lab) | UrlResolver::findUrl raw href then ResourceFetcher::fetchResource GET |
recon (server-side fetch) | Lab-proven. http://127.0.0.1:18080/oembed returned DRUPAL-OEMBED-SSRF-WITNESS |
| Read the HTTP body of that URL into PHP | Same GET; JSON/XML parsed as oEmbed | recon | Lab-proven. Witness was in the 200 body |
Same GET for thumbnail_url after a resource is built |
OEmbed::getLocalThumbnailUri ~417-456 |
recon | Inferred from the pin. This lab stopped at the discovered href |
| Reach RFC1918 / link-local / metadata if the PHP netns can | Unscoped Guzzle GET | recon | Inferred. Lab used loopback, not 169.254.169.254 |
Closed: first hop when patterns are empty (lab-proven); first hop when the HTML host does not match (lab-proven); unauthenticated media create on Standard without a media role; RCE; admin session theft.
The Drupal PHP process fetches the href. Confidentiality of whatever that URL returns to PHP. Not an admin session. Not RCE unless an internal service already would execute on GET.
The lab
Gadget of the 11.4.8 UrlResolver::discoverResourceUrl / findUrl plus the ResourceFetcher GET. Pin copies live under lab/pin/. First-hop HTML on http://127.0.0.1:19510. Second hop http://127.0.0.1:18080/oembed inside the gadget netns. Empty patterns blocked. Wrong host blocked. Allowed first hop returned the witness.
SUCCESS drupal-oembed-ssrf how=gadget pin=11.4.8 first-hop=allowed second-hop=127.0.0.1:18080 default-off=blocked DRUPAL-OEMBED-SSRF-WITNESSpython3 drupal-oembed-ssrf-Abraxas-Labs.pyor cd lab && ./run.sh. Loopback only.
Wrong turns, in order
I treated default-off as a miss. It is the intended first-hop gate. The leftover starts after an admin turns discovery on.
I almost stood up a live Standard site as the oracle. Media roles, oEmbed providers, and the admin form are a lot of moving parts for a function that is twenty lines. The gadget is the pin functions. how=gadget is in the SUCCESS line on purpose.
I almost claimed RCE because Guzzle ran inside PHP. SSRF is the class. Closed surface: no shell.
Theatre: a reverse shell. The oracle is default-off plus wrong-host blocked plus the second-hop witness.
The fix
Run the same host / private-IP policy on the discovered endpoint and on thumbnail_url. Do not fetch an href whose host would have failed the first hop.
Pack
- GitHub: abraxas/drupal-oembed-ssrf
- Loopback client: drupal-oembed-ssrf-Abraxas-Labs.py
- Lab: lab/
Abraxas Labs · abraxaslabs.tech · github.com/abraxas · @abraxas_null · abraxas.null@proton.me