Skip to content

[Feature]: Make opencv-python-headless an optional dependency for FIPS compliance #40741

Description

@rdwj

🚀 The feature, motivation and pitch

On FIPS-enabled clusters (e.g., Red Hat OpenShift), opencv-python-headless 4.13.0.90 crashes vLLM at startup with FATAL FIPS SELFTEST FAILURE (crypto/fips/fips.c:154) because the wheel statically bundles OpenSSL 1.1.1k, which fails the kernel FIPS self-test. This is tracked in #33147.

The version cannot be pinned back to 4.12.0.88 because 4.13 contains the fix for CVE-2026-22778 (CVSS 9.8 RCE), as noted when #33756 was rejected. The upstream opencv-python fix (opencv/opencv-python#1190) remains unmerged.

However, since #39986 merged PyAV as the default video backend, opencv-python-headless is no longer required for the default code path. It is only needed when a user explicitly selects the opencv video backend via --media-io-kwargs '{"video": {"backend": "opencv"}}'.

Proposal: Move opencv-python-headless from requirements/common.txt to a new opencv optional extra in setup.py, following the existing pattern used by audio, tensorizer, otel, and others. When a user selects the opencv video backend without the package installed, vLLM should raise a clear error at import time directing them to pip install vllm[opencv].

This unblocks FIPS-enabled deployments without reverting the CVE fix, and aligns with the direction the project is already heading with the PyAV migration.

Related: #33147, #33756, #39986

Alternatives

Additional context

We operate FIPS-enabled OpenShift AI clusters and currently work around this by building an overlay image that removes opencv-python-headless entirely (vLLM uses Pillow for image processing, and PyAV for video). This has been running in production without issues. Happy to submit a PR implementing this change.

Before submitting a new issue...

  • Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the documentation page, which can answer lots of frequently asked questions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions