Privilege Escalation
Gaining rights beyond those granted: vertical (user to admin, function-level), horizontal (user A to user B, object-level), or cross-boundary (org-admin to platform-admin, app to cluster or cloud). In web apps it is the impact of a broken access control, not a separate bug class.
How it works
Escalation needs a place where the server trusts something the caller influences more than the server’s own record of the caller’s rights. Common anchors:
- Role carried by the client:
?role=1,admin=truecookie,roleidin a profile update, or role claims in a token the server doesn’t verify. - Role check scoped too broadly: “is admin somewhere” instead of “is admin of this org/tenant/folder”.
- Hierarchy gaps: the org admin may edit users but nothing stops them editing a platform admin; the target or parent of a move isn’t checked.
- Type confusion: permissions keyed on record type, with the type user-controlled.
- Framework enforcement quirks: the authz hook fires, but the engine still resolves the field or mutation.
- Horizontal to vertical: an IDOR on another user’s profile, password or role becomes vertical once the victim is an admin (PortSwigger:
myaccount?id=of an admin discloses or changes the admin’s password).
Techniques / payloads
| Vector | Example |
|---|---|
| Parameter/cookie role | GET /login/home.jsp?admin=true; flip Admin=false cookie; add "roleid":2 to a profile-update body (PortSwigger labs) |
| Token claim tampering | decode the access token, set alg to HS256, change nameid to 430 and append role: CeAdmin, then resend (see JWT Algorithm Confusion) |
| Mass assignment | extra fields on profile edit (legal_name, dob, government ID) accepted without resetting verified, called “identity drift”, which then linked third-party insurance records (see Mass Assignment) |
| Cross-org role update | PUT /api/memberships/{id} with role=Admin, using an admin token from org A on a membership in org B; the backend only checked “token is admin” |
| Self-targeted IDOR | an Employee may edit a User’s IP-allowlist ACL but not their own; swap the target ID to self to strip their own ACL |
| Session switching | WSTG: manipulate group/profile/condition values or IP, and swap session identifiers between roles |
| Stored XSS to admin | WordPress contributor plants XSS (Legacy Widget block, The Events Calendar CVE-2026-123464) that creates an admin when an admin views it |
| Template sandbox | Shopware Twig/App Scripts with insufficient isolation bypass authorization checks, leading to admin takeover (< 6.6.10.32 / 6.7.16.1) |
| Type change | Silverstripe GridField: user-controlled ClassName changes a record into an unrelated class, bypassing that class’s permission checks (CVE-2026-91113) |
| Re-parenting | TeamPass update_folder doesn’t check target or parent folder IDs, so a user can move credential subtrees or convert folders to personal |
GraphQL engine bugs that turn into privesc (owned by GraphQL Authorization Flaws):
- graphql-ruby
Execution::Next(GHSL-2026-152): whenauthorized?raisesGraphQL::UnauthorizedError, the runner still callsresolve. Data is returned and mutations execute. - @neo4j/graphql ≥ 5.2.0: a type-level
@authenticationsilently discards the stricter field-level rule on root custom-resolver fields, so any authenticated client can invoke restricted operations (fixed 7.6.0+/5.12.15+).
Beyond the web tier
App bugs frequently escalate into the platform underneath:
- Kubernetes RBAC:
system:mastersbypasses RBAC and authz webhooks and can’t be revoked by removing bindings.escalate,impersonate,nodes/proxy, CSR API access, list on Secrets (returns contents), create-Pod (implicitly every Secret, ConfigMap and PV in the namespace) and create-PersistentVolume (hostPath) are all escalation primitives. OperTraitor measures the gap between what operators document and what their RBAC grants (IBM Turbonomic CVE-2026-6389). - Jupyter Enterprise Gateway 3.2.3:
KERNEL_UID="0 "(trailing space) beats the UID-0 denylist, giving root in the kernel pod. Combined with hostPath mounts and the gateway’s broad service account, that becomes cluster admin. - AWS IAM: IAM Vulnerable deploys 250+ resources covering 31 IAM privesc paths (Gietzen’s research; Pacu, Cloudsplaining).
- AD: BadSuccessor.
CreateChildon an OU lets you create a dMSA linked to a privileged account, and the KDC grants the predecessor’s privileges (Windows Server 2025). - Host: Copy Fail (CVE-2026-31431), an AF_ALG +
splice()page-cache corruption, gives root and container breakout.dockergroup membership is root by design.
Notable cases
- Organization takeover, $1,200: Manager in org B escalated to Admin via a cross-org membership update. Root cause: role endpoint not scoped to the org.
- flowintel < 4.1.0: org admins could modify platform-admin accounts through the browser admin user editor.
- IDOR + ACL bypass ($100): Employee removed their own network ACL by targeting their own user ID.
- Insurance takeover via identity drift: mass-assigned identity fields stayed “verified” and matched third-party records.
- Keycloak FGAP re-parenting (GHSA-g8fg-4fv8-5mjx): a group admin restricted from a sub-group moved it to the top of the hierarchy, where the restriction no longer applied, then controlled its members; the flaw is an incomplete fix of a previous one, and can reach realm takeover (advisory). Parent changes must re-evaluate the permission on the object’s new and old position.
- Open5GS WebUI ≤ 2.8.0 (CVE-2026-135691): a generic
PATCH /api/db/Account/route let user-role accounts setrolesto admin and overwrite password hashes — a model-level write with no role check (advisory). See Mass Assignment. - Self-editable permissions: on a hosting platform, the “View & Manage Contacts” permission exposed the team-member permission editor, including the sub-user’s own row, so a contacts-only user granted themselves Modify Admin Profile, Security, Invoices and Domain Settings through the UI, with no admin notification (One Checkbox Too Many). An actor must never be able to edit its own grants.
Defenses
- Derive role and tenant from server-side session state, never from request fields or unverified token claims. Pin JWT algorithms.
- Scope every role check to the resource’s org/tenant/folder (
isAdmin(user, resource.org)), and enforce a role hierarchy (an actor can’t modify principals at or above its own level). - Allowlist writable fields (DTOs) to kill mass assignment of
role,verifiedorClassName. - Treat type, parent and owner changes as privileged operations with their own checks.
- Platform: no
system:mastersfor humans, auditescalate/impersonate/nodes/proxygrants,automountServiceAccountToken: false, downscope operator service accounts.
Related
- Authorization Security
- Broken Access Control
- Function Level Authorization
- Multi-Tenant Isolation
- Insecure Direct Object Reference
- Mass Assignment
- JSON Web Tokens
- GraphQL Authorization Flaws
- Account Takeover
- SSRF in Kubernetes and Containers
- Leaked Cloud Credentials
Sources
- Access Control Vulnerabilities and Privilege Escalation - PortSwigger · original
- Broken Access Control - Vertical Privilege Escalation Writeup · original
- Testing for Privilege Escalation - OWASP WSTG · original
- Privilege Escalation by JWT Token Manipulation · original
- Organization Takeover via Privilege Escalation (IDOR) · original
- Privilege Escalation via IDOR and ACL Bypass in SaaS · original
- Mass Assignment and the Identity Drift: From Profile Edit to Insurance Takeover · original
- From Contributor to Administrator: Stored XSS in The Events Calendar · original
- Shopware insufficient Twig template isolation permits privilege escalation · original
- flowintel authorization bypass in admin user editing · original
- Silverstripe: user-controlled ClassName allows unauthorized record type change · original
- TeamPass folder re-parenting authorization bypass · original
- @neo4j/graphql privilege escalation via dropped field-level @authentication · original
- GHSL-2026-152: privilege escalation via authorization bypass in graphql-ruby · original
- Kubernetes RBAC Good Practices · original
- OperTraitors: How Kubernetes Operators Betray Your Security Posture · original
- Jupyter Enterprise Gateway - From Notebook to Kubernetes Cluster Admin - elttam · original
- IAM Vulnerable · original
- BadSuccessor — Exploiting delegated Managed Service Accounts in Windows Server 2025 · original
- CVE-2026-31431: Copy Fail vulnerability enables Linux root privilege escalation across cloud environments · original
- Why Being in the Docker Group Is a Backdoor to Your Whole System · original
- Keycloak administrative interface authorization flaw · original
- Open5GS WebUI incorrect authorization · original
- One Checkbox Too Many: How a Contacts Permission Turned Into Admin Access · original