CVE-2026-123813: pyLoad: Privilege revocation and password change through the REST API do not invalidate the user's session
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.
Other sources
pyLoad is a free and open-source download manager written in Python. Prior to 0.5.0b3.dev102, pyLoad does not invalidate existing Flask sessions when an administrator changes a user's permissions or password through /api/setuserpermission or /api/changepassword. Api.setuserpermission and Api.changepassword update the database, but session authorization continues to use role and permission values copied at login by setsession in webui/app/helpers.py. A user can therefore retain revoked privileges or continue using a session established with an old password for the configured session lifetime. API-key authentication is not affected because that path rereads user data from the database. This issue is fixed in version 0.5.0b3.dev102.
— MITRE
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
pyLoadto a version that resolves this vulnerability.Fixed in 0.5.0b3.dev102
Event History
Frequently Asked Questions
Who is exposed to this issue?
Deployments that use the documented REST administration endpoints for user permission changes or password changes are exposed. Affected users are those who already have an active Flask session when an administrator makes the change through the API.
What does an attacker need to exploit it?
The attacker needs an existing authenticated session with privileges that are later revoked, or a session established before their password is changed. No user interaction is required after the session already exists.
Does changing a user's password through the REST API terminate their current access?
No. Api.change_password updates the database but does not invalidate the user's existing session, so that session can continue using the role and permissions copied into it at login.
How can I determine whether my instance is affected?
Use the REST API to revoke permissions for a test user or change that user's password while the user has an active session. If requests made with that pre-existing session continue to be authorized using the former role or permissions, the instance is affected.