Skip to content

pyLoad is vulnerable to attacks that bypass localhost restrictions, enabling the creation of arbitrary packages

High severity GitHub Reviewed Published Jul 7, 2025 in pyload/pyload • Updated Jul 8, 2025

Package

pip pyload-ng (pip)

Affected versions

<= 0.5.0b3.dev88

Patched versions

None

Description

Summary

Any unauthenticated attacker can bypass the localhost restrictions posed by the application and utilize this to create arbitrary packages.

Details

Any unauthenticated attacker can bypass the localhost restrictions posed by the application and utilize this to create arbitrary packages. This is done by changing the Host header to the value of 127.0.0.1:9666.

PoC

The application has middleware that prevents access to several routes by checking whether the Host header has a specific value. We bypassed this restriction.

https://github.com/pyload/pyload/blob/4159a1191ec4fe6d927e57a9c4bb8f54e16c381d/src/pyload/webui/app/blueprints/cnl_blueprint.py#L21-L36

#: decorator
def local_check(func):
    @wraps(func)
    def wrapper(*args, **kwargs):
        remote_addr = flask.request.environ.get("REMOTE_ADDR", "0")
        http_host = flask.request.environ.get("HTTP_HOST", "0")

        if remote_addr in ("127.0.0.1", "::ffff:127.0.0.1", "::1", "localhost") or http_host in (
            "127.0.0.1:9666",
            "[::1]:9666",
        ):
            return func(*args, **kwargs)
        else:
            return "Forbidden", 403

    return wrapper

Below we see that the '/flash/add' endpoint uses the middleware above.

https://github.com/pyload/pyload/blob/4159a1191ec4fe6d927e57a9c4bb8f54e16c381d/src/pyload/webui/app/blueprints/cnl_blueprint.py#L56-L58C11

@bp.route("/flash/add", methods=["POST"], endpoint="add")
@local_check
def add():

Notice how we are not authorized to access this endpoint when sending a request.
image

However, if we set the Host header to be 127.0.0.1:9666, we notice the request returns success.
image

Checking the front end as an admin, we now see that this did indeed succeed.
image

Impact

An unauthenticated user can perform actions that should only be available to authenticated users.

References

@GammaC0de GammaC0de published to pyload/pyload Jul 7, 2025
Published to the GitHub Advisory Database Jul 8, 2025
Reviewed Jul 8, 2025
Last updated Jul 8, 2025

Severity

High

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Network
Attack complexity
Low
Privileges required
None
User interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
High
Availability
None

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N

EPSS score

Exploit Prediction Scoring System (EPSS)

This score estimates the probability of this vulnerability being exploited within the next 30 days. Data provided by FIRST.
(38th percentile)

Weaknesses

Improper Access Control

The product does not restrict or incorrectly restricts access to a resource from an unauthorized actor. Learn more on MITRE.

Authentication Bypass by Spoofing

This attack-focused weakness is caused by incorrectly implemented authentication schemes that are subject to spoofing attacks. Learn more on MITRE.

CVE ID

CVE-2025-7346

GHSA ID

GHSA-x698-5hjm-w2m5

Source code

Credits

Loading Checking history
See something to contribute? Suggest improvements for this vulnerability.