Skip to content
CSRF Write-up Intermediate

HTML Over the Wire

The HTML Over the Wire frameworks Hotwire Turbo and HTMX allow link attributes to specify HTTP methods and headers, and they fail to restrict these to same-origin requests. An attacker who can inject a link or control the turbo-root can cause the victim's CSRF token to be sent to an attacker-controlled domain.

Ryan Follow

Published on bountyplz.xyz

## HTML Over the Wire

Ryan, on bountyplz.xyz

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the frameworks do not enforce that requests with custom methods or headers stay on the same origin, so a link can direct sensitive headers to an external host.

Impact

An attacker could steal a victim's CSRF token, potentially allowing them to perform actions on the victim's behalf, though the text does not demonstrate full exploitation beyond token exfiltration.

What the attacker needed

Link injection on the page; turbo-root set to user-controlled path; victim clicks the link

The fix

The frameworks should restrict custom methods and headers to same-origin requests, but the text notes that no patch has been released for Hotwire Turbo.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

CSRF tokens are secret codes websites use to prove a request came from their own pages. These new frameworks let a link say 'send a POST request' or 'add this header', but they don't check that the destination is the same website. So if an attacker can add a link to a page, the victim's browser may send the secret token to the attacker's server.

What is CSRF?

Another site makes a signed-in user's browser perform an action they did not intend.

More by Ryan

View all

2 more disclosed reports, best first.

Similar reports

View all

Same bug class and techniques, clearest first.

Cross-site request forgery (CSRF)

The lesson behind this report.

Another site makes a signed-in user's browser perform an action they did not intend.