All vulnerabilities

Servers and applications

GHSA-3285-4h5r-3q5x

Authorization bypass in middleware via double-encoded action names

Severity
Medium 4.8
Published
2 Dec 2026
Last changed
2 Dec 2026
Added to UpHeron
2 Dec 2026
Fixed in
7.4.14
Weakness
CWE-174Incorrect authorization (CWE-863)
Attack
Over the network · Only under certain conditions · No login needed · No user action needed
Attacker can
Read some data · Change some data
CVSS vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N
Sources
Project advisories (GitHub)

Description

Astro Actions let middleware inspect an incoming action with getActionContext(), including its action.name, so that some actions can be refused before they run. The name given to middleware was decoded one time fewer than the name Astro used to look up and run the action. A name that was percent-encoded a second time, such as %2561dmin.deleteUser, was shown to middleware as %61dmin.deleteUser but ran admin.deleteUser.

For example, this middleware:

refused POST /?_action=admin.deleteUser but let POST /?_action=%2561dmin.deleteUser through, and the admin.deleteUser action ran. RPC actions could be reached the same way with a path such as /_actions/%25/_actions/%2561dmin.deleteUser, which stops Astro's path decoding early.

Bypass of authorization rules in middleware, but only in on-demand rendered applications that refuse actions in middleware by comparing action.name against a denylist, an exact name, or a prefix. Rules that only allow a fixed list of names are not affected.

From withastro/astro's security advisory. Shortened; the full text is there.

Workarounds

Upgrade to astro 7.4.14 or later. Before upgrading, check authorization inside the action handler, or refuse actions in middleware only by allowing a fixed list of names.

Workarounds as given by withastro/astro's security advisory.

Affected software

SoftwareAffected versions
AstroServers and applications · github:withastro/astro
  • Every version before 7.4.14

About Astro

The web framework for content-driven websites.

From its GitHub repository.
Developers who used it in the past year
4.5%Stack Overflow Developer Survey 2025, 2025
Weekly downloads (npm)
12,020,872npm, 29 Nov 2026
GitHub stars
64,305GitHub, 29 Nov 2026
Forks
3,943GitHub, 29 Nov 2026
Latest release
@astrojs/[email protected]GitHub, 29 Nov 2026
Released
18 Nov 2026GitHub
First published on GitHub
15 Mar 2021GitHub

References