Bug 2584205 (CVE-2026-126984)

Summary: CVE-2026-126984 pulp_python: pulp_python: pull-through caching fetches a client-supplied URL with the remote's credentials
Product: [Other] Security Response Reporter: OSIDB Bzimport <bzimport>
Component: vulnerabilityAssignee: Product Security <prodsec-ir-bot>
Status: NEW --- QA Contact:
Severity: urgent Docs Contact:
Priority: urgent    
Version: unspecifiedKeywords: Security
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: ---
Doc Text:
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.
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description OSIDB Bzimport 2026-11-25 15:07:43 UTC
PythonRemote.get_remote_artifact_url() in pulp_python/app/models.py returns the request's redirect query parameter as the download URL. It does not compare that value with the remote's URL or with the URL the upstream simple page listed for the file.

pull_through_package_simple() in pulp_python/app/pypi/views.py builds the simple-page link as <filename>?redirect=<upstream file URL>. Handler._match_and_stream() in pulpcore/content/handler.py calls get_remote_artifact_url() when the distribution has a remote and the relative path is not already stored. It builds a RemoteArtifact with that URL and no digest, then downloads it through Remote.get_downloader(). DownloaderFactory._http_or_https() sets aiohttp basic auth from the remote's username and password whenever the username is set, and HttpDownloader passes that auth on the GET to the URL it was given.

The response body is written to the client. The remote policy field defaults to immediate. For immediate and on_demand, the content type for a package file is PythonPackageContent, _save_artifact() stores the file, and PythonRepository.async_pull_through_add_content() adds it to the repository. PythonPackageContent.init_from_artifact_and_relative_path() takes the filename from the request path and the project name and version from the file's metadata. The package simple page builds its listing from the remote and then applies the repository's files with releases.update(local_releases), so a stored filename is the one later clients see. A streamed policy skips the save. The download, the returned body, and the basic-auth header still happen. A relative path that is already in the repository is served from the stored artifact.

An anonymous client can read the response of a URL it chooses, from the content app's network position. When the remote has a username and password, those credentials are sent to the host in that URL. From pulp_python 3.14.0 onward the saved file is part of the repository and is served to later clients of the distribution.

The caller needs no Pulp account. Distribution.content_guard is null by default, and Handler._permit() allows the request when no guard is set. The distribution must have a remote. That is the pull-through configuration. No extra plugin is required.

The redirect return was introduced by Gerrod Ubben in commit 81b613388069487d50f9db19c5e3a3675c9d7bc7, committed 2021-11-30. pulp_python 3.6.0, released 2021-12-15, is the first release that contains it. Saving pull-through content into the repository was added in commit df8b5ad22dbac8537d427975815e05b4894ed492 on 2025-04-02, released in pulp_python 3.14.0 on 2025-04-10.

The same function appends .metadata to the client-supplied URL when the requested path ends in .metadata. Remote.get_remote_artifact_url() joins the configured remote URL and the relative path.