Abstract. GiveWP 4.18.0 ships a v3 REST donation API whose permission callback guards the wrong thing. It checks the caller's capability only when a request opts into extra sensitive fields or anonymous records; the default read falls straight through to
return true. An unauthenticated caller can therefore read donor first names, exact amounts, dates and a stable donor identifier across the whole site. This is CWE-862 (Missing Authorization) with IDOR characteristics. The write-up covers the root cause and the fix at a secure-coding level only — in line with coordinated disclosure, the operational proof of concept stays private until a patch exists.
Keywords: GiveWP, broken access control, missing authorization, CWE-862, IDOR, REST API permission callback, donor privacy, WordPress.
1. Introduction
GiveWP is one of the most widely deployed donation platforms for WordPress, reported at 100,000+ active installations. By design it stores records that are sensitive on their face: who gave, how much, and when. Expose those records through a REST API and the authorization check on that API becomes a privacy boundary. Write the check so it guards the wrong thing, and the boundary quietly disappears.
That is exactly what happens here. The flaw is a clean instance of CWE-862 (Missing Authorization) with insecure-direct-object-reference (IDOR) characteristics, and it is worth studying beyond GiveWP itself: gating the optional, extra data while leaving the base read open is a mistake that recurs in REST permission callbacks right across the ecosystem.
2. Affected component
| Plugin | GiveWP – Donation Plugin — slug give |
| Tested version | 4.18.0 (current at time of testing) |
| Active installations | 100,000+ |
| Vulnerability type | Broken Access Control / Sensitive Information Disclosure (IDOR + unauthenticated enumeration) |
| CWE | CWE-862 Missing Authorization / CWE-639 IDOR / CWE-200 |
| Required privilege | None — unauthenticated, remote |
| User interaction | None |
| CVSS 3.1 | ~6.5 (Medium) AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N |
| Status | Fresh — unpatched at time of writing; confirmed in code and in an authorized localhost lab |
The donation records are served by the v3 REST routes under GET /wp-json/givewp/v3/donations (list) and the matching single-record route. A single permission callback guards both: DonationController::validationForGetMethods().
3. Technical analysis
The whole defect lives in that callback. Instead of requiring the donations-view capability for every read, it requires the capability only when the request asks for extra sensitive data or for anonymous donations. The base read falls through to return true.
// src/API/REST/V3/Routes/Donations/DonationController.php
public function validationForGetMethods(WP_REST_Request $request)
{
$includeSensitiveData = $request->get_param('includeSensitiveData');
$includeAnonymousDonations = $request->get_param('anonymousDonations');
$canViewDonations = UserPermissions::donations()->canView();
if ($includeSensitiveData && !$canViewDonations) { // only gates the *extra* fields
return new WP_Error('rest_forbidden', ...);
}
if ($includeAnonymousDonations !== null) {
$anonymousMode = new DonationAnonymousMode($includeAnonymousDonations);
if ($anonymousMode->isIncluded() && !$canViewDonations) { // only gates anonymous donations
return new WP_Error('rest_forbidden', ...);
}
}
return true; // <-- base read: NO capability check -> reachable by an unauthenticated user
}A permission callback exists to authorize the action — reading donation records — not to police a handful of response fields. Both conditional guards here cover only the opt-in extras (includeSensitiveData) and anonymous records. Send the default parameters, with sensitive data off and anonymous excluded, and neither guard fires; the callback then authorizes the request for everyone, unauthenticated callers included.
There is a response-shaping layer, DonationViewModel, and it does drop some fields when includeSensitiveData is false: email, donor IP, billing address and the gateway transaction ID are removed, and the last name is cut to an initial. That stripping is not an authorization boundary. The model still hands back the donor's full firstName, the lastName initial, the exact amount, createdAt, status, gatewayId, the form and campaign identifiers, and an enumerable donorId. Removing a few fields from an unauthorized response does not make the response authorized.
4. How the flaw is reached (conceptual)
With the default parameter set the callback returns true, so on the ordinary read path the authorization gate is simply absent. A request carrying no cookie, nonce or token is treated the same as an administrator asking for the non-sensitive view.
Two properties of the endpoints then turn that gap from theoretical into material:
- Direct object reference. Single records are addressed by a small, sequential numeric identifier, and nothing ties that identifier to the caller's identity. A record meant for staff review is reachable by anyone who references it — the defining shape of an IDOR.
- Listability. The list route returns collections. Add the missing authorization and one disclosure becomes bulk enumeration of every non-anonymous donation, while the stable
donorIdlets records be stitched into a per-donor giving history.
In plain terms, an unauthenticated visitor can learn who donated, how much and when, across the entire site. Full PII — email, postal address, IP, full last name — stays behind the view-model stripping, which is why both the confidentiality impact and the overall score land at Medium rather than High. The exact request sequence, parameter combinations and responses are left out deliberately; the mechanism above is enough to understand the issue and defend against it.
5. Impact assessment
An unauthenticated, remote actor, with no user interaction, can enumerate every non-anonymous donation and recover the donor's first name, the donation amount, the date, the gateway, the form or campaign, and a stable donorId for correlation. On a donation platform that is two breaches at once: a privacy breach (donor identities and giving history) and a financial-confidentiality breach (the exact amounts).
The vector AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N describes a network-reachable, low-complexity, no-privilege, no-interaction read with high confidentiality impact and no effect on integrity or availability. Because full PII stays protected, we rate it 6.5 Medium. A triager may well score it higher, given the financial and identity nature of the data and how trivial the unauthenticated enumeration is.
6. Remediation
Authorize the action at the top of the callback, ahead of any field- or mode-specific logic, so no read path can slip past it:
if ( ! UserPermissions::donations()->canView() ) {
return new WP_Error('rest_forbidden', __('You do not have permission to view donations.','give'), ['status' => $this->authorizationStatusCode()]);
}The existing includeSensitiveData and anonymous-donation checks then stay in place as additional gates layered on top of that base capability check. If some surface genuinely needs to be public — a curated, opt-in "donor wall", say — it should get its own dedicated, explicitly public endpoint instead of riding on a management REST API left open to the world.
Site owners should move to a fixed release as soon as the vendor ships one. Until then, the hardening measures below apply.
7. Detection and hardening for site owners
Everything here follows from the mechanics above, nothing more:
- Watch the REST path. Check web-server and access logs for unauthenticated requests to the v3 donation routes (
/wp-json/givewp/v3/donationsand single-record reads) from clients with no authenticated session. A burst of sequential single-record reads, or largeper_pagelist reads from anonymous clients, is the enumeration signature. - Least privilege, smaller surface. If your deployment has no need to expose the donation REST API publicly, restrict it at the edge — reverse proxy, firewall or allowlist — so only authenticated or internal callers reach it.
- Virtual patching. A WAF or edge rule can deny unauthenticated access to these specific routes while you wait for the update. Treat it as a stopgap, not a replacement for the upstream fix.
- Stay current. Apply the vendor's fixed release promptly once it lands, and keep plugins on a maintained update cadence in general.
- Data minimisation. Take past exposure seriously: assume non-anonymous donation metadata may already have been readable, and plan donor notifications according to what your jurisdiction requires.
8. The broader lesson
The principle generalises cleanly: a permission callback has to authorize the operation, not just sanitise the output. Field-level stripping in a response model is a defence-in-depth nicety and never the access-control boundary. The moment you catch yourself gating only the "extra" or "opt-in" parameters of an endpoint, ask what the default path does. If the answer is "the request is allowed," the base action is unprotected.
Two habits keep this bug class out of the codebase. Deny by default: require the capability first, then layer finer-grained checks on top. And never confuse shaping a response with authorizing it. A REST permission callback should read as a single question — "may this caller perform this read at all?" — with sensitive-field and mode handling treated strictly as refinements on an already-authorized action.
9. Responsible disclosure
This research follows coordinated disclosure. The vendor has been notified privately, and the full technical detail — including the operational proof of concept — stays out of public release until a fix is available or the agreed disclosure window elapses, whichever comes first. Nothing that would enable live abuse is published here.
All testing was carried out by Noroxi LLC as authorized security research, against the researcher's own isolated, localhost-bound lab, using the publicly available GPL plugin and synthetic test data. No third-party systems were touched, and the test environment was torn down afterwards.
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
- CWE-200: Exposure of Sensitive Information to an Unauthorized Actor — https://cwe.mitre.org/data/definitions/200.html
- WordPress REST API Handbook — Adding permission callbacks — https://developer.wordpress.org/rest-api/extending-the-rest-api/adding-custom-endpoints/#permissions-callback
- OWASP — Broken Access Control — https://owasp.org/Top10/A01_2021-Broken_Access_Control/
- 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.