CVE-2026-126984 — Pulp Python — CWE-918
A **server-side request forgery** flaw has been found in the get_remote_artifact_url() function in pulp_python/app/models.py of the pull-through caching feature in the **pulp_python** package. The function uses the redirect query parameter from the client request as the URL to download. A network attacker or user who can reach the content app of a Python distribution that has a remote can choose that URL. The content app downloads it and returns the response. When the remote has a username and password, the download sends those credentials to the host in the URL. When the remote policy is immediate, the default, or on_demand, the file is saved into the distribution's repository and later clients are served that file. The project name and version come from the file, and the filename comes from the request path. A filename the repository already stores is served from the stored file.
A **server-side request forgery** flaw has been found in the get_remote_artifact_url() function in pulp_python/app/models.py of the pull-through caching feature in the **pulp_python** package. The function uses the redirect query parameter from the client request as the URL to download. A network attacker or user who can reach the content app of a Python distribution that has a remote can choose that URL. The content app downloads it and returns the response. When the remote has a username and password, the download sends those credentials to the host in the URL. When the remote policy is immediate, the default, or on_demand, the file is saved into the distribution's repository and later clients are served that file. The project name and version come from the file, and the filename comes from the request path. A filename the repository already stores is served from the stored file.
🎯 What is this vulnerability?
This vulnerability is a Server-Side Request Forgery (SSRF) flaw (CWE-918) located in the pulp_python package, specifically within the get_remote_artifact_url() function in pulp_python/app/models.py.
The core technical failure is the lack of input validation and sanitization on the redirect query parameter. In the context of Pulp's pull-through caching feature, when a client requests a Python package (artifact) that is not yet cached locally, the Pulp Content App attempts to fetch it from the configured remote repository. The vulnerable function constructs the URL for this upstream request by directly appending or utilizing the redirect parameter provided by the client.
Because the Content App runs with network access to the internal environment (to reach the remote repository) and potentially holds credentials for that remote repository, an unauthenticated attacker can manipulate the redirect parameter to point to arbitrary internal URLs (e.g., http://169.254.169.254/latest/meta-data/ for cloud metadata, or http://internal-service:8080/admin). The Pulp server then performs an HTTP GET request to this attacker-controlled URL.
Critically, the CVSS vector S:C (Scope: Changed) and C:H (Confidentiality: High) indicate that the response from the internal target is returned to the attacker. Furthermore, if the remote repository is configured with a username and password, these credentials are sent in the HTTP headers (or Basic Auth) to the attacker-controlled host, leading to credential theft.
⚡ Attack Chain
1. Discovery & Reconnaissance
- Fingerprinting: The attacker identifies a Pulp instance. Pulp typically exposes a
/pulp/api/v3/endpoint. Thepulp_pythonplugin is often enabled by default or explicitly installed. - Version Check: The attacker queries
/pulp/api/v3/python/distributions/(if unauthenticated read access is allowed) or attempts to access a known Python distribution path (e.g.,/pypi/simple/) to confirm the presence of thepulp_pythoncomponent. - Configuration Inference: The attacker determines if a remote repository is configured for pull-through caching. This is often the default setup for public PyPI mirrors.
2. Exploitation
The attacker sends a request to the Pulp Content App endpoint that serves Python packages. The exact URI depends on the distribution base path, but typically follows the pattern/pypi/simple/<package_name>/.The vulnerability is triggered by appending the redirect parameter to the request.
Illustrative PoC (curl):
# Example: Attacking a Pulp instance at http://pulp-server:8080
# The distribution base path is assumed to be /pypi/
# The attacker requests a non-existent package 'testpkg' to force a remote fetch
# The 'redirect' parameter is set to an internal target
curl -v "http://pulp-server:8080/pypi/simple/testpkg/?redirect=http://169.254.169.254/latest/meta-data/"Mechanics:
1. The request hits the Pulp Content App.
2. The get_remote_artifact_url() function extracts redirect=http://169.254.169.254/latest/meta-data/.
3. The Pulp server initiates an HTTP GET request to http://169.254.169.254/latest/meta-data/.
4. Scenario A (SSRF Data Exfiltration): The response from the metadata service (e.g., IAM role credentials, instance ID) is returned to the attacker in the HTTP response body.
5. Scenario B (Credential Theft): If the remote PyPI repository is configured with username and password, the Pulp server sends these credentials in the Authorization header to 169.254.169.254. The attacker can set up a listener to capture these credentials.
6. Scenario C (Internal Service Interaction): The attacker can target internal services (e.g., http://10.0.0.5:5000/api/v1/status) to probe internal networks or trigger actions if the internal service accepts GET requests with side effects.
Note on File Caching:
The CVE description states: "When the remote policy is immediate, the default, or on_demand, the file is saved into the distribution's repository and later clients are served that file."
This means the attacker can also poison the cache. If the attacker points redirect to a malicious Python package hosted on an external server, Pulp will download it, save it to the local repository, and serve it to all subsequent clients. This leads to Supply Chain Compromise.
3. Post-Exploitation
🌍 Real World Impact
GET /admin/reset), the attacker can trigger these actions.
Practical Consequences:
🛡️ Remediation & Mitigation
1. Patching
pulp_python to a version that includes the fix. The fix likely involves:redirect parameter from the URL construction logic.
* Validating the redirect parameter against a whitelist of allowed domains (e.g., only the configured remote repository host).
* Disabling the redirect parameter entirely if it is not a standard PyPI feature.
pulp_python GitHub repository and PyPI for the specific patch release. As of the CVE publication date (26.11.2026), a patched version should be available.2. Workarounds (If Immediate Patching is Not Possible)
on_demand with strict validation, or disable the remote repository entirely and use a static repository.169.254.169.254) from the Pulp server using firewall rules.
* Block access to internal network ranges (e.g., 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16) from the Pulp server.
redirect parameter in the query string for the Pulp Content App endpoints.
* Example ModSecurity Rule (Illustrative):SecRule ARGS:redirect "@rx ^http" "id:100001,phase:2,deny,status:403,msg:'SSRF attempt via redirect parameter'"3. Detection
/pypi/simple/) that contain the redirect parameter.
* Example Log Pattern: GET /pypi/simple/<package>/?redirect=http://...
169.254.169.254) or internal IPs.
* Use tools like Zeek or Suricata to detect SSRF patterns.
⚠️ Urgency
This is a critical vulnerability with a low barrier to exploitation. An unauthenticated attacker can easily trigger the SSRF and potentially achieve full compromise of the cloud environment or supply chain. Even though it is not currently in the CISA KEV catalog, the high severity and ease of exploitation make it a top priority for patching.
Recommended Actions:
1. Immediately upgrade pulp_python to the latest patched version.
2. If patching is delayed, implement network segmentation to block outbound traffic from the Pulp server to all hosts except the legitimate remote PyPI repository.
3. Audit the Pulp repository for any signs of cache poisoning (unexpected packages or hash mismatches).
4. Rotate any credentials used for the remote PyPI repository, as they may have been compromised.
[🤖 CVE Professor AI Security Engine]
FOFA Query