CWE-837
AllowedImproper Enforcement of a Single, Unique Action
Abstraction: Base · Status: Incomplete
The product requires that an actor should only be able to perform an action once, or to have only one unique action, but the product does not enforce or improperly enforces this restriction.
32 vulnerabilities reference this CWE, most recent first.
GHSA-RR73-568V-28F8
Vulnerability from github – Published: 2026-05-05 21:29 – Updated: 2026-05-13 13:52Summary
A business logic vulnerability in the Grav Admin Panel allows a low-privileged user (with only user creation permissions) to overwrite existing accounts, including the primary administrator. By creating a new user with a username that already exists, the system updates the existing account's metadata and permissions instead of rejecting the request. This leads to a Denial of Service (DoS) on administrative functions and Privilege De-escalation of the root account.
Details
The vulnerability stems from an insecure "Create or Update" logic within the user management module. When the admin-addon handles a user creation request, it does not strictly validate whether the username is already taken by a higher-privileged account. Instead of returning a "409 Conflict" or a validation error, the application logic proceeds to overwrite the existing user configuration file (e.g., user/accounts/root0.yaml) with the new, lower-privileged data provided by the attacker. Because the attacker cannot assign higher permissions to themselves (due to existing fixes), the result is that the targeted account (the original Admin/Root) has its access levels wiped or replaced by the attacker's input, effectively locking the real administrator out of the system.
PoC
- Log in as a Super User (e.g., root0) and create a low-privileged user (e.g., adminuser).
- Assign adminuser the following specific permissions: admin.login admin.users.list admin.users.read admin.users.create
- Log out and log back in as adminuser.
- Navigate to User Accounts -> Add.
- Fill in the form with the following details:
Username: root0 (The exact username of the Super User)
Email:
anything@grav.fFullname: Fake Root0 - Click Save.
- Observe that the account is successfully "created".
- The original administrative permissions are gone, and the account is now restricted.
PoC video
https://github.com/user-attachments/assets/047cb44e-0279-402b-b4fb-12bf5d427a5e
Impact
This is a Privilege De-escalation and Account Disruption vulnerability. Who is impacted: Any Grav installation where a non-admin user is granted permission to create other users. Consequence: An attacker can effectively disable all administrative accounts on the platform, leading to a complete loss of management control over the CMS.
Maintainer note — fix applied (2026-04-24)
Fixed in Grav core on the 2.0 branch: commit d904efc33 — will ship in 2.0.0-beta.2.
What changed: UserObject::save already had a uniqueness guard (commit 19c2f8da7, November 2025) that blocks the PoC. This release tightens that guard:
strpos($key, '@@')→str_contains($key, '@@'). The previous form was falsy when the transient-key marker was at position 0 (e.g.@@hash), silently bypassing the check.str_containsreturns a proper boolean.- The
instanceof FileStoragegate was dropped so the uniqueness check runs for anyFlexStorageInterfacebackend — not just the default file-per-user YAML one.
A low-privileged user with admin.users.create can no longer disrupt a super-admin account by submitting that admin's username through the "add user" form.
Files:
- system/src/Grav/Common/Flex/Types/Users/UserObject.php.
- tests/unit/Grav/Common/Security/UserOverwriteSecurityTest.php — 3 tests pinning the PoC, the @@-prefix edge case, and pass-through for free usernames.
{
"affected": [
{
"package": {
"ecosystem": "Packagist",
"name": "getgrav/grav"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "2.0.0-beta.2"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2026-42609"
],
"database_specific": {
"cwe_ids": [
"CWE-269",
"CWE-285",
"CWE-639",
"CWE-837"
],
"github_reviewed": true,
"github_reviewed_at": "2026-05-05T21:29:53Z",
"nvd_published_at": "2026-05-11T16:17:33Z",
"severity": "HIGH"
},
"details": "### Summary\nA business logic vulnerability in the Grav Admin Panel allows a low-privileged user (with only user creation permissions) to overwrite existing accounts, including the primary administrator. By creating a new user with a username that already exists, the system updates the existing account\u0027s metadata and permissions instead of rejecting the request. This leads to a Denial of Service (DoS) on administrative functions and Privilege De-escalation of the root account.\n\n### Details\nThe vulnerability stems from an insecure \"Create or Update\" logic within the user management module. When the admin-addon handles a user creation request, it does not strictly validate whether the username is already taken by a higher-privileged account. Instead of returning a \"409 Conflict\" or a validation error, the application logic proceeds to overwrite the existing user configuration file (e.g., user/accounts/root0.yaml) with the new, lower-privileged data provided by the attacker.\nBecause the attacker cannot assign higher permissions to themselves (due to existing fixes), the result is that the targeted account (the original Admin/Root) has its access levels wiped or replaced by the attacker\u0027s input, effectively locking the real administrator out of the system.\n\n### PoC\n1. Log in as a Super User (e.g., root0) and create a low-privileged user (e.g., adminuser).\n2. Assign adminuser the following specific permissions:\nadmin.login\nadmin.users.list\nadmin.users.read\nadmin.users.create\n3. Log out and log back in as adminuser.\n4. Navigate to User Accounts -\u003e Add.\n5. Fill in the form with the following details:\nUsername: root0 (The exact username of the Super User)\nEmail: `anything@grav.f`\nFullname: Fake Root0\n7. Click Save.\n8. Observe that the account is successfully \"created\".\n9. The original administrative permissions are gone, and the account is now restricted.\n\n#### PoC video\nhttps://github.com/user-attachments/assets/047cb44e-0279-402b-b4fb-12bf5d427a5e\n\n### Impact\nThis is a Privilege De-escalation and Account Disruption vulnerability.\nWho is impacted: Any Grav installation where a non-admin user is granted permission to create other users.\nConsequence: An attacker can effectively disable all administrative accounts on the platform, leading to a complete loss of management control over the CMS.\n\n\n---\n\n## Maintainer note \u2014 fix applied (2026-04-24)\n\nFixed in Grav core on the `2.0` branch: commit [`d904efc33`](https://github.com/getgrav/grav/commit/d904efc33) \u2014 will ship in **2.0.0-beta.2**.\n\n**What changed:** `UserObject::save` already had a uniqueness guard (commit [`19c2f8da7`](https://github.com/getgrav/grav/commit/19c2f8da7), November 2025) that blocks the PoC. This release tightens that guard:\n\n1. `strpos($key, \u0027@@\u0027)` \u2192 `str_contains($key, \u0027@@\u0027)`. The previous form was falsy when the transient-key marker was at position 0 (e.g. `@@hash`), silently bypassing the check. `str_contains` returns a proper boolean.\n2. The `instanceof FileStorage` gate was dropped so the uniqueness check runs for any `FlexStorageInterface` backend \u2014 not just the default file-per-user YAML one.\n\nA low-privileged user with `admin.users.create` can no longer disrupt a super-admin account by submitting that admin\u0027s username through the \"add user\" form.\n\n**Files:**\n- [`system/src/Grav/Common/Flex/Types/Users/UserObject.php`](https://github.com/getgrav/grav/blob/2.0/system/src/Grav/Common/Flex/Types/Users/UserObject.php).\n- [`tests/unit/Grav/Common/Security/UserOverwriteSecurityTest.php`](https://github.com/getgrav/grav/blob/2.0/tests/unit/Grav/Common/Security/UserOverwriteSecurityTest.php) \u2014 3 tests pinning the PoC, the `@@`-prefix edge case, and pass-through for free usernames.",
"id": "GHSA-rr73-568v-28f8",
"modified": "2026-05-13T13:52:30Z",
"published": "2026-05-05T21:29:53Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/getgrav/grav/security/advisories/GHSA-rr73-568v-28f8"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-42609"
},
{
"type": "WEB",
"url": "https://github.com/getgrav/grav/commit/5a12f9be8314682c8713e569e330f11805d0a663"
},
{
"type": "WEB",
"url": "https://github.com/getgrav/grav/commit/c66dfeb5ff679a1667678c6335eb9ff3255dfc47"
},
{
"type": "WEB",
"url": "https://github.com/getgrav/grav/commit/d904efc33e03ebb597afde8d3368b28cf0423632"
},
{
"type": "PACKAGE",
"url": "https://github.com/getgrav/grav"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:H",
"type": "CVSS_V3"
}
],
"summary": "Grav Vulnerable to Administrative Account Disruption and Privilege De-escalation via User Overwrite Logic"
}
GHSA-XQH3-FR5H-W8CJ
Vulnerability from github – Published: 2023-09-30 15:30 – Updated: 2023-09-30 15:30A vulnerability classified as problematic was found in phpkobo Ajax Poll Script 3.18. Affected by this vulnerability is an unknown functionality of the file ajax-poll.php of the component Poll Handler. The manipulation leads to improper enforcement of a single, unique action. The attack can be launched remotely. The exploit has been disclosed to the public and may be used. The identifier VDB-240949 was assigned to this vulnerability.
{
"affected": [],
"aliases": [
"CVE-2023-5313"
],
"database_specific": {
"cwe_ids": [
"CWE-362",
"CWE-837"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2023-09-30T15:15:10Z",
"severity": "MODERATE"
},
"details": "A vulnerability classified as problematic was found in phpkobo Ajax Poll Script 3.18. Affected by this vulnerability is an unknown functionality of the file ajax-poll.php of the component Poll Handler. The manipulation leads to improper enforcement of a single, unique action. The attack can be launched remotely. The exploit has been disclosed to the public and may be used. The identifier VDB-240949 was assigned to this vulnerability.",
"id": "GHSA-xqh3-fr5h-w8cj",
"modified": "2023-09-30T15:30:18Z",
"published": "2023-09-30T15:30:18Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2023-5313"
},
{
"type": "WEB",
"url": "https://github.com/tht1997/WhiteBox/blob/main/PHPKOBO/ajax_pool_script.md"
},
{
"type": "WEB",
"url": "https://vuldb.com/?ctiid.240949"
},
{
"type": "WEB",
"url": "https://vuldb.com/?id.240949"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N",
"type": "CVSS_V3"
}
]
}
No mitigation information available for this CWE.
No CAPEC attack patterns related to this CWE.