
Drupal 11.4.8 - उच्च - रिमोट - XSS - AttributeXss अभी भी HTMX attrs की अनुमति देता है
abraxaslabs.tech · github.com/abraxas · @abraxas_null · [email protected] · drupal-htmx-attr
Class: Stored XSS Reach: Remote
Drupal core 11.4.8 (61044508) - Drupal
SA-CORE-2026-011 ने Xss::attributes() में HTMX attrs को बंद कर दिया। Link और menu attributes AttributeXss::sanitizeAttributes से गुज़रते हैं, और वह skip list अभी भी केवल style और on* को हटाती है।
एक content editor जो Link field (या menu link) सेट कर सकता है, hx-on-click या data-hx-on-click को store कर सकता है। Standard plus BigPipe core/htmx को load करता है। जब कोई admin या कोई अन्य viewer उस node को खोलता है और link पर click करता है, तो HTMX stored JS को site origin में चलाता है।
| ID | अभी तक कोई CVE नहीं |
| Class | Stored XSS (HTMX event attrs) |
| Reach | Remote (authenticated Link field / menu writer; victim देखता है और click करता है) |
| CWE | CWE-79 |
| CVSS | High: 8.7 CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:N |
| Product | Drupal core |
| Affected | 11.4.8 (61044508071749629aaf3380aa85971e94df9e84) |
| Auth | authenticated user जो Link field (या menu link) लिख सकता है। Victim page देखता है और click करता है। |
| License | GNU Affero GPL v3.0 |
| Lab | केवल 127.0.0.1 |
Writer: एक content editor जो link options.attributes (Link field, menu link, JSON:API) सेट कर सकता है। Victim: कोई भी जिसका page HTMX load करता है (Standard + BigPipe core/htmx load करता है), जिसमें एक site admin भी शामिल है जो link पर click करता है।
| Privilege | Method / path | Kind | Lab-proven या inferred |
|---|---|---|---|
| एक link पर HTMX event attrs persist करना | POST /jsonapi/node/article with field_link.options.attributes.hx-on-click and data-hx-on-click | Stored field की Integrity | Lab-proven। JSON:API 201, stored attrs में अभी भी hx-on-click है |
उन attrs को node <a> पर print करना | LinkFormatter -> AttributeXss::sanitizeAttributes | HTML की Integrity | Lab-proven। GET /node/1 HTML में hx-on-click और marker window['DRUPAL-HTMX-ATTR-WITNESS']=1 है |
| Victim origin में उस JS को चलाना जब वे click करते हैं | HTMX hx-on-* को bind करता है | Victim session की Integrity | HTMX + page के core/htmx load करने से inferred। Lab ने browser click नहीं चलाया |
| Viewer के रूप में कार्य करना (session cookie, admin UI clicks) | Same stored XSS | Victim session की Integrity | Inferred। Lab HTML में attribute बने रहने पर रुक जाता है |
Negative: Xss::filter | Xss::filter('<a ... hx-on-click=...>') | Closed | Lab-proven closed। xss_keeps_hx=False |
| Link का Unauthenticated write | JSON:API बिना session के | Closed | Lab ने पहले uid 1 के रूप में login किया। बिना account वाला अजनबी field सेट नहीं कर सकता |
| PHP RCE / LPE | n/a | Closed | यह leftover browser JS है, server पर PHP नहीं |
Same pin leftover: Move Block sibling markup.
मैंने SA-CORE-2026-011 के बाद drupal/drupal 11.4.8 को pin किया। पाँच hunts: XSS/HTMX, file/MIME/oEmbed, JSON:API/unserialize/SQLi, auth/CSRF/Host, REST/media/Views। JSON:API access, EntityQuery IN keys (SA-004), serialized-field POI (SA-005), और rebuild.php Host (SA-007) patched रहते हैं। HTMX skip list केवल Xss.php में landed हुई।
$skip = (
in_array($attribute_name, ['style', 'srcdoc']) ||
str_starts_with($attribute_name, 'on') ||
str_starts_with($attribute_name, 'data-hx') ||
str_starts_with($attribute_name, 'hx') ||
str_starts_with($attribute_name, '-') ||
strlen($attribute_name) > 96
);
AttributeXss.php leftover:
$skip = (
$attribute_name == 'style' ||
str_starts_with($attribute_name, 'on') ||
str_starts_with($attribute_name, '-') ||
strlen($attribute_name) > 96
);
Callers में LinkFormatter.php और MenuLinkContent::getUrlObject() शामिल हैं।
पहले से दर्ज wrong turns: Xss::filter को leftover मानना (यह control है); unauth JSON:API write; PHP RCE; एक reverse shell। Theatre। Oracle वह attr है जो node HTML पर बचा रहता है साथ ही core/htmx loaded।
python3 drupal-htmx-attr-Abraxas-Labs.py
या
cd lab
./run.sh
Target केवल http://127.0.0.1:19480। Live drupal:11.4.8-apache, Standard profile, lab के लिए JSON:API write enabled। Compose project drupal-htmx-attr।
SUCCESS drupal-htmx-attr how=live write=jsonapi nid=1 hx-on-click=kept jsonapi-stored=1 xss-filter=stripped htmx=loaded marker=1 version=11.4.8 DRUPAL-HTMX-ATTR-WITNESS
hx / data-hx / srcdoc denylist को AttributeXss में copy करें। इसे Xss में fold करें जैसा कि class docblock पहले से कहता है।
61044508071749629aaf3380aa85971e94df9e84)AttributeXss.php · Xss.phpGNU Affero GPL v3.0। देखें LICENSE। केवल Loopback lab। कोई warranty नहीं।