Skip to main content

A vLLM Dockerfile Dependency Confusion: How One --extra-index-url Put the Official Image at Risk (GHSA-jrf6-vqxq-pjv2)

· 8 min read
Ankush K
Co-founder and CTO, Dwaar
A vLLM Dockerfile Dependency Confusion: How One --extra-index-url Put the Official Image at Risk (GHSA-jrf6-vqxq-pjv2)

If you serve models from the vllm/vllm-openai image, or build your own from the vLLM Dockerfile, reviewing the Python would not have shown you this problem. It sits in one flag of the image build and a PyPI package name the project did not hold.

GHSA-jrf6-vqxq-pjv2, published on June 9, describes a dependency confusion in that build. The advisory reports no exploitation. The fix shipped four days earlier, in a release that listed it as a build fix, so check your version even if you read those notes and moved on.

At a glance
IdentifierGHSA-jrf6-vqxq-pjv2
Affectedvllm/vllm-openai images and the vLLM Dockerfile, below 0.22.1
Fixed in0.22.1, released 2026-06-05
Severity8.8 High, CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H. This is the score on the maintainers' advisory, which names no separate scorer
Exploited as of 2026-06-11None reported in the advisory
Disclosed2026-06-09, reporter credited as jstawinski

Three settings that only fail together​

The advisory lays out three conditions, and each one looks harmless alone.

The name. flashinfer-jit-cache came from a custom index at flashinfer.ai/whl/, but the advisory says the name was not registered on PyPI. A legitimate holder would have kept it out of reach, and the project had none in place.

The strategy. The Dockerfile sets this separately in several build stages, including line 118 in base and line 693 in vllm-base, the stage that runs this install:

ENV UV_INDEX_STRATEGY="unsafe-best-match"

Under this setting, the advisory explains, uv searches every configured index and picks the best version across them. When the same version exists on both, "PyPI is preferred as the primary index."

The flag. Here is the install, from the Dockerfile at v0.22.0, released May 29:

RUN --mount=type=cache,target=/opt/uv/cache \
uv pip install --system flashinfer-jit-cache==${FLASHINFER_VERSION} \
--extra-index-url https://flashinfer.ai/whl/cu$(echo $CUDA_VERSION | cut -d. -f1,2 | tr -d '.')

--extra-index-url adds flashinfer.ai alongside PyPI. It does not replace PyPI. So PyPI stays in the search for this package, and so does whoever holds the name there.

Do not count on the pin. FLASHINFER_VERSION is 0.6.11.post2, and the advisory says the pin "does not mitigate this", because an attacker can publish that same version and "uv prefers the primary (PyPI) index." uv's documentation points the other way on that tie. Its CLI reference says --extra-index-url indexes "take priority over the index specified by --index-url (which defaults to PyPI)" and that under unsafe-best-match, "If a package version is in multiple indexes, only look at the entry for the first index." Its index documentation says the default index is "always treated as lowest priority." Taken literally, that puts flashinfer.ai ahead in a tie. I read the CLI reference at tag 0.7.0 and the index page at 0.11.20, and I have not reproduced this build, so I am not settling the disagreement here. Test the tie-break on the uv version your build installs rather than assume either answer. Whichever way it lands, a pin tells the resolver which version you want. It says nothing about where it comes from.

Line 850 of the same file runs flashinfer show-config && flashinfer download-cubin, which per the advisory "runs import flashinfer as root". That gives a payload full filesystem access during the build and a place in the final layer. The advisory's description of the outcome is "a persistent backdoor embedded in every container produced from the official Dockerfile."

How close this came​

This is a latent exposure, not a compromise. The advisory says a third party claimed the name on March 5 (it gives no year, and I read it as 2026), uploading version 0.1.0 as a "sec-test" proof of concept. PyPI quarantined it, and the advisory says it "does not appear overtly malicious." The stated risk is forward looking: "if the name becomes available again in the future, it exposes vLLM Docker images to a supply chain compromise."

My own reading, which the advisory does not state: an upload at 0.1.0 would not satisfy a pin of ==0.6.11.post2. The dangerous case the advisory describes is someone holding the name and publishing the matching version. The advisory does not say any vllm-openai image was built with a malicious package, and neither do I.

The order of events is worth noticing:

DateEvent
June 3PR #44366 merged, changing --extra-index-url to --index-url for this install
June 5v0.22.1 released, with the change listed as "fixing image builds" while the package "is quarantined on PyPI"
June 9Advisory published

If you decide on upgrades from release notes, this looked like build housekeeping until June 9.

The fix is also narrow. In the v0.22.1 Dockerfile, line 763 uses --index-url, but UV_INDEX_STRATEGY="unsafe-best-match" is still set globally, and other installs still use --extra-index-url for the PyTorch index (lines 754, 829 and 843, for example). I have not examined whether those installs carry any exposure, and I am not claiming they do. This change closed one path. It did not retire the setting.

What to do now​

  1. Get to 0.22.1 or later. The advisory's vulnerable range is below 0.22.1 and its patched range is 0.22.1 and up. Rebuild or re-pull, then replace what is running. The advisory lists no workaround.
  2. Check any Dockerfile you carry yourself. If you forked or copied the vLLM Dockerfile, upgrading elsewhere does not touch your copy. Apply the change from PR #44366: --index-url, one index, for this install.
  3. Look back at images built before 0.22.1. Where your build logs or dependency manifests record it, check whether flashinfer-jit-cache resolved from flashinfer.ai/whl or from pypi.org. This check is my inference from the root cause, not an advisory recommendation. If it came from PyPI, or you cannot tell, rebuild from 0.22.1 or later rather than argue about it.

The recipe is part of what you ship​

Nothing here depends on vLLM's application code. A review of that code would not show which index supplied this package, and a dependency scan of a lockfile may not either, because that choice is made in the Dockerfile and the result lives in an image layer. That is the case for scanning the artifact you ship.

Be honest about the limit, though. In the case the advisory describes, the substitute carries the same name and version, so an image inventory could read the same either way, which is one more reason to know what an SBOM tells you and what it does not. You need the image, because that is where the bytes are, and you need the Dockerfile, because that is where the decision was made.

Treat package index settings as security configuration, reviewed like an IAM policy. A value with "unsafe" in its name deserves an owner and a written reason. For a package that belongs to one custom index, use --index-url on that command so the question of which index wins never comes up.

Search your Dockerfiles for --extra-index-url and UV_INDEX_STRATEGY. For every hit, name the package, say who holds that name on PyPI, and say which index wins if both offer the same version, based on a test rather than on memory. Any line where you cannot answer all three is your next fix.

References​