GHSA-jq7h-wrvp-3rgx: High severity pip/pyload-ng vulnerability

Published Oct 9, 2026
·
Updated

An admin who revokes a user's privileges through the REST API does not actually revoke them, because the session carrying those privileges is never invalidated.

pyLoad authorizes each request from values copied into the Flask session at login. setsession in webui/app/helpers.py writes role and perms once, and both loginrequired and the session branch of apikeyauth read them back from the session rather than from the database. The fix for GHSA-66hx-chf7-3332 handled this by deleting the user's session files, but the call was added only in webui/app/blueprints/jsonblueprint.py, at the three WebUI form handlers. Api.setuserpermission and Api.changepassword in core/api/init.py write to the database and return. Both are exported over /api/<func> and both appear in the OpenAPI spec the project serves at /api, so the documented administration interface takes the unpatched route.

I should concede an overlap up front. GHSA-66hx-chf7-3332 does name the core method in its own Details, pointing at setuserpermission and noting that it updates the database role and permission only. What that advisory does not do is name /api/setuserpermission as a reachable route, and it does not mention changepassword at all, which is the half I think is new.

I ran this against pyload-ng 0.5.0b3.dev101 installed from PyPI, on a real instance with real users. Demoting an admin from role 0 to role 1 with permission 0 by POSTing /api/setuserpermission updated the database immediately. The demoted user's existing session still returned 200 on /api/getuserdir, still loaded /settings, and still wrote reconnect.script through /api/setconfigvalue, which is the admin-only option CVE-2026-33509 was published for. The identical change through /json/updateusers killed that session at once: the same request returned 401 and /settings redirected to the login page.

The password path behaves the same way. After POSTing /api/changepassword for a user, their old password was refused at login and the new one accepted, but the session opened under the old password kept working. Through /json/changepassword it was dropped. So an owner who rotates a password through the API to evict somebody does not evict them.

One limit worth stating: the API-key branch of apikeyauth reads the user from the database on every request, so key-authenticated callers are not stale. This affects the session branch only.

webui.sessionlifetime defaults to 44640 minutes, so a stale session can outlive the revocation by about a month.

I think the invalidation belongs beside the database write in the core API rather than in the blueprint, so that every caller of these operations picks it up. Re-reading role and permission from the database per request would close the whole class, but that is a larger change and I have not measured what it would cost here.

I used AI assistance while investigating this, and every result above was executed by me against the released wheel with the paired control runs shown.

Affected Software

1 affected component
pip/pyload-ng<=0.5.0b3.dev101

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Operational

    In core/api/__init__.py, have Api.change_password and Api.set_user_permission delete the affected user's session files immediately after the database write, so existing session-branch sessions are invalidated for API calls as well as WebUI calls.

Event History

Oct 9, 2026
Advisory Published
via GitHub·05:09 PM
Data Sourced
via GitHub·05:09 PM
DescriptionSeverityWeaknessAffected Software

Frequently Asked Questions

1

Who can exploit this issue?

An administrator with access to the documented REST API can trigger it by revoking another user's permissions or changing that user's password through the API. The affected user's existing session can retain the role and permissions copied into it at login.

2

Which administrative actions use the affected path?

The affected core methods are Api.set_user_permission and Api.change_password, exported through /api/<func>. The documented /api/set_user_permission route reaches the unpatched database-update path rather than the WebUI form handlers that delete session files.

3

Are users affected after they create a new session?

The issue applies to an existing session carrying permissions set at login. pyLoad's authorization checks read the role and permissions from the Flask session rather than retrieving current values from the database for each request.

4

What should administrators do if they must revoke access before applying the fix?

Ensure the affected user's existing session files are deleted, since deletion of those files is the mechanism used by the prior fix in the WebUI handlers. Updating permissions or changing the password through the REST API alone does not invalidate the session.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203