Miggo Logo

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

4.3

CVSS Score
3.1

Basic Information

CVE ID
-
EPSS Score
-
Published
7/30/2025
Updated
7/30/2025
KEV Status
No
Technology
TechnologyPython

Technical Details

CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:N
Package NameEcosystemVulnerable VersionsFirst Patched Version
pyload-ngpip<= 0.5.0b3.dev89

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability is a log injection flaw within the add_package function of the pyload API. The root cause is the failure to sanitize the name parameter, which is sourced from user-controlled input via the /json/add_package endpoint. The provided patch ddf8a48b83aaf36052b08732c424cffcf9ffccca directly addresses this by introducing a sanitized_name variable where newline (\n) and carriage return (\r) characters are escaped before the name is used in a log message. This prevents an attacker from injecting malicious, multi-line log entries to tamper with the application's logs. The identified vulnerable function, Api.add_package, is the exact location where the vulnerable user input is processed and logged, making it the central point of this security flaw.

Vulnerable functions

Api.add_package
src/pyload/core/api/__init__.py
The 'add_package' function in the Api class receives the package name from user input. This name was previously logged without sanitizing newline characters. An attacker could provide a package name containing newlines to inject fake log entries, as the newline character acts as a delimiter for log entries. The patch introduces sanitization by replacing newline and carriage return characters, thus preventing the log injection.

WAF Protection Rules

WAF Rule

### Summ*ry * lo* inj**tion vuln*r**ility w*s i**nti*i** in `pylo**` in *PI `/json/***_p**k***`. T*is vuln*r**ility *llows us*r wit* *** p**k***s p*rmission to inj**t *r*itr*ry m*ss***s into t** lo*s **t**r** *y `pylo**`. ### **t*ils `pylo**` will **

Reasoning

T** vuln*r**ility is * lo* inj**tion *l*w wit*in t** `***_p**k***` *un*tion o* t** `pylo**` *PI. T** root **us* is t** **ilur* to s*nitiz* t** `n*m*` p*r*m*t*r, w*i** is sour*** *rom us*r-*ontroll** input vi* t** `/json/***_p**k***` *n*point. T** pro