Abstract. A privileged AJAX endpoint in a widely deployed WordPress plugin resolves any caller-supplied attachment ID to its media URL without checking either a capability or a nonce. Any authenticated user — down to a Subscriber — can therefore turn a numeric ID into a media URL and filename that their role was never meant to see. This writeup covers the root cause, the secure-coding defect, the impact and the fix, for a defensive audience. The issue is unpatched as of writing, so under coordinated disclosure the full operational proof of concept is held back until a fix ships.
Keywords: WordPress, broken access control, IDOR, missing authorization, CWE-862, CWE-639, AJAX, nonce, capability check.
1. Introduction
Admin and Site Enhancements (ASE), slug admin-site-enhancements, is a popular WordPress plugin with 200,000+ active installations. Among its many administrative conveniences is an optional "Enable SVG Upload" feature, and that feature is where this access-control flaw lives.
An authenticated AJAX action that trusts a client-supplied object ID and skips both the authorization check and the nonce is one of the most common server-side access-control mistakes in the WordPress ecosystem (CWE-862, missing authorization; CWE-639, IDOR). The trap is the assumption that a logged-in user is a safe user. WordPress ships a detailed role and capability model; authentication only answers who the caller is, never what they are allowed to do. A Subscriber is logged in yet holds almost no privileges, so a feature built for editors or administrators has to re-check capability on every single request.
2. Affected component
| Field | Value |
|---|---|
| Plugin | Admin and Site Enhancements (ASE) |
| Slug | admin-site-enhancements |
| Vendor | Bowo (qriouslad) |
| Tested / Affected version | 9.2.0 (latest, 2026-10-05) |
| Active installs | 200,000+ |
| Vulnerability type | Broken Access Control / IDOR + missing nonce (CSRF) |
| CWE | CWE-862 (Missing Authorization) / CWE-639 (IDOR) |
| Authentication required | Any authenticated user (Subscriber and above) |
| Prerequisite | The "Enable SVG Upload" feature is enabled (registers the handler). |
| CVSS 3.1 (proposed) | 4.3 Low — AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N |
3. Technical analysis
The handler get_svg_attachment_url() lives at classes/class-svg-upload.php:415 and is wired up in bootstrap.php:255 with add_action('wp_ajax_svg_get_attachment_url', ...). The action sits on the authenticated wp_ajax_ hook and has no wp_ajax_nopriv_ twin, so it answers every logged-in role, Subscriber included, while staying closed to anonymous visitors.
The defect is right there in the handler:
// classes/class-svg-upload.php:415
public function get_svg_attachment_url() {
$attachment_id = $_REQUEST['attachmentID'];
echo esc_url( wp_get_attachment_url( $attachment_id ) ); // no cap, no nonce
wp_die();
}WordPress secure-coding guidance treats two checks as mandatory on a privileged AJAX action. Both are absent.
- No capability check. Nothing calls
current_user_can( ... ). A media handler like this should demand a capability such asupload_files; instead it treats every authenticated role alike. - No nonce verification. There is no
check_ajax_referer(). A request with no nonce can be forged cross-origin, so on top of the access-control gap the endpoint is also CSRF-able.
attachmentID travels straight from $_REQUEST into wp_get_attachment_url(), so the caller decides which object gets referenced. That is the insecure-direct-object-reference pattern in one line: the object key comes from the client, and the server never confirms the caller may reference that particular object.
esc_url() does wrap the echoed value, which rules out reflected XSS on the output. But output encoding was never the problem here; the missing piece is an authorization decision on the way in.
4. How the flaw is reached (conceptual)
A Subscriber has no normal route into the media library. Listing media — say, the wp/v2/media REST endpoint for non-public items — needs upload_files or edit_posts, neither of which a Subscriber holds. The access boundary is meant to sit above that role.
The endpoint walks straight past it. It answers any authenticated session and takes an attachment ID as plain input, so a low-privilege account can ask the server to turn an ID into the matching media URL and filename, data that account can reach through no sanctioned interface. Attachment IDs are sequential integers, which means the identifier space maps cleanly onto media URLs, private, draft and unattached items included, none of which were meant to be enumerable at Subscriber level. Where registration is open, the "authenticated" prerequisite melts into "anyone", since anyone can sign themselves up as a Subscriber.
The literal request sequence, the parameter values and the enumeration routine stay out of this writeup. The mechanism above is enough to understand the flaw and defend against it, and it is not a copy-paste attack recipe.
5. Impact assessment
What leaks is the attachment-ID → URL/filename mapping. A low-privilege or self-registered Subscriber can learn the URLs and filenames of media objects — private, draft and unattached files among them — that their role should not expose.
The rating is Low (CVSS 4.3), and the vector says why:
AV:N / AC:L / PR:L / UI:N— reachable over the network, low complexity, needs a low-privilege authenticated session, no user interaction.C:L— confidentiality impact is limited to the URL/filename mapping. The file bytes already sit under the publicly reachableuploads/directory, so what leaks is which files exist and where, not a fresh route to content that was otherwise cryptographically sealed.I:N / A:N— the handler only reads, so nothing is altered and nothing goes down.S:U— scope is unchanged.
Context decides the real risk. Filenames and the URLs of private or draft media can give away unreleased product names, customer documents, internal naming conventions, or simply the fact that material the owner assumed was unlisted exists at all.
6. Remediation
The fix restores the two server-side checks the handler is missing:
check_ajax_referer( 'asenha_svg', 'nonce' );
if ( ! current_user_can( 'upload_files' ) ) {
wp_send_json_error( '', 403 );
}For developers and the plugin author: verify a nonce on every privileged AJAX action, and gate it behind the least capability the feature honestly needs — upload_files for anything touching media. Treat every object ID that arrives in $_REQUEST as untrusted, and confirm the current user is authorized for that object rather than merely logged in.
For site owners: until a fixed release lands, the handler's prerequisite is your mitigation surface (see §7). Apply the vendor update the moment it ships and confirm you are on the patched build.
7. Detection and hardening for site owners
Everything here follows straight from how the flaw works.
- Turn off the optional feature if you don't use it. The vulnerable handler is registered only while "Enable SVG Upload" is on. No SVG uploads on your site means the endpoint never exists.
- Close open registration, or watch it closely. The blast radius jumps the moment anyone can self-register a Subscriber. If registration has to stay open, assume every self-service account can reach every Subscriber-level endpoint.
- Apply least privilege. Audit which accounts carry which roles, and don't hand anyone a role above what they actually use.
- Watch for enumeration. In the access logs, repeated authenticated hits on
admin-ajax.phpfor one action with a numeric parameter that climbs steadily are the signature of object-ID enumeration. A bursty run of them from a single low-privilege session is worth a look. - Virtual patching / WAF. A web-application firewall or virtual-patch rule can restrict that AJAX action to users who hold the right capability — a stopgap until the plugin is fixed, and a compensating control rather than a replacement for the code fix.
- Keep plugins updated. Install the fixed release as soon as it's out.
8. Broader lesson
Authentication is not authorization. Every privileged request raises two separate questions — who are you, and are you allowed to do this to this object? — and in WordPress the second one has a concrete answer: a capability check with current_user_can, plus a nonce via check_ajax_referer for anything that changes state or is sensitive.
Moving an action from wp_ajax_nopriv_ to wp_ajax_ only lifts the floor from "everyone" to "every logged-in user", and on a site with open registration those two populations nearly coincide. Any endpoint that accepts a client-supplied object ID has to verify authorization for that specific object, because the ID is attacker-controlled by definition. Those two checks are what turn an IDOR into a non-event.
9. Responsible disclosure
The work followed coordinated (responsible) disclosure. The vendor was notified privately, and full technical reproduction detail is kept out of this public article until a fix exists. We plan to publish the complete writeup only after a patched release, with timing coordinated with the maintainer.
All testing ran on a local, isolated WordPress instance under our control. No third-party systems were accessed, scanned or affected. Noroxi LLC performs authorized security research only and does not publish operational exploit material for unpatched issues.
References
- CWE-862: Missing Authorization — https://cwe.mitre.org/data/definitions/862.html
- CWE-639: Authorization Bypass Through User-Controlled Key (IDOR) — https://cwe.mitre.org/data/definitions/639.html
- OWASP: Broken Access Control — https://owasp.org/Top10/A01_2021-Broken_Access_Control/
- WordPress Developer Handbook — Nonces — https://developer.wordpress.org/apis/security/nonces/
- WordPress Developer Handbook — Checking User Capabilities — https://developer.wordpress.org/apis/security/user-roles-and-capabilities/
- WordPress Plugin Handbook — AJAX — https://developer.wordpress.org/plugins/javascript/ajax/
- FIRST CVSS v3.1 Calculator — https://www.first.org/cvss/calculator/3.1
Published for defensive and educational purposes. Noroxi LLC conducts authorized security research only; operational exploit detail is withheld until a fix is available.
Exploited this week · every Monday
New KEV entries, fresh PoCs, WordPress triage and what to do this week. No account needed.