You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
OpenSSL FIPS selftest failure when importing cv2 on FIPS-enabled systems #1191
I checked the problem with documentation, FAQ, open issues, forum.opencv.org, Stack Overflow, etc and have not found any solution
I updated to the latest OpenCV version and the issue is still there
There is reproducer code and related data files (videos, images, onnx, etc)
Reacted by Matthew Vine, Bradan Craig, ADITYA MISHRA, Stephen Robinson, Neil French, Øystein Nordberg, Sveinung Fjær, Eirik Nesje, Magnar Ovedal Myrtveit, matsoob and 5 more
I opened a PR that addresses this issue by removing bundled OpenSSL from the
manylinux build and relying on system OpenSSL instead.
PR:#1190 @vmiller987 Let me know if this is satisfactory
Reacted by vmiller987, synJerry, Chris Schoenherr and Stephen Sullivan
OpenCV does not use OpenSSL and does not contain any crypto related code. The SSL is 3rdparty dependency for one or several OpenCV 3rdparty dependencies, e.g. FFmpeg, QT, image IO libraries.
I opened a PR that addresses this issue by removing bundled OpenSSL from the manylinux build and relying on system OpenSSL instead. PR:#1190@vmiller987 Let me know if this is satisfactory
@AdityaMishra3000 , @asmorkalov , thank you for the fast responses. I am not used to this.
The #1190 PR would appear to resolve my issue.
I pulled your branch, built the wheel, and installed it.
Hello @asmorkalov , I am new to these procedures. Thanks for the clarification.
I agree this is not OpenCV core but a 3rdparty issue. Let me know if you’d like me to adjust anything
in the PR or if there’s a preferred direction for handling this.
+1 Anything we can do to get #1190 pushed? FIPS Compliant machine are currently running with a critical vulnerability until this is addressed: GHSA-4r2x-xpjr-7cvv
Reacted by Braxton Owens, ADITYA MISHRA, stephen-carden, Alberto Cano, synJerry, Chris Schoenherr, Eric Manning, rdel49 and Tim Helmstedt
I apologize for late response, too many things are going on in parallel. It's time to bring more facts to make a decision.
OpenSSL is used primarily by FFmpeg. It's needed to handle https URLs like for web streams and RTSP cameras. We cannot drop the OpenSSL (or analog) dependency without significant functionality degradation. I'm very sure that OpenCV is actively used for network streaming and security cameras. The dependency was introduced here: Added OpenSSL & various protocol support to FFmpeg backend #229. readelf -d example for opencv-python 5.0.0:
Even manylinux 2014 does not include OpenSSL into list of guarantied system libraries: proof. It means that OpenSSL have to be included into distributed wheel and will be a subject of FIPS anyway.
The OpenSSL build in the openssl-python and -headless wheels at PyPi since 4.13.0.90 is OpenSSL 1.1.1k FIPS 25 Mar 2021. It has got downgraded from the OpenSSL 1.1.1w 11 Sep 2023 build until 4.12.0.88 and acquired the FIPS support in it.
To get this fixed, you need to find out where the wheels on PyPi are built and why they use an even older openssl. It is not built from the sources and versions in this repository.
*[Update: I must have mixed up some files. opencv_python_headless-4.14.0.94-cp37-abi3-manylinux_2_28_x86_64.whl has OpenSSL 1.1.1k FIPS 25 Mar 2021 while opencv_python_headless-4.14.0.94-cp37-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl has OpenSSL 1.1.1w 11 Sep 2023]
(Another issue then is that the OpenSSL 1.1.1w being targeted went EOL in 2023 and unless there is paid extended support, there is none. If someone is concerned about vulnerabilities, it should be upgraded to a version that is still supported.)
I drafted a change PR #1264 to migrate to PyPi Trusted Publishing. Your workflows seem to now use long lived secrets. They also fail to release installing twine.
OpenCV environment for python packages build does not use OpenSSL provided by system package manager. It's too old and we are not sure about security issues there. OpenCV built own instance of latest OpenSSL library during docker image build:
This is actually currently not true for manylinux_2_28:
If you copy the relevant OpenSSL download/build section from manylinux2014 to manylinux_2_28, it should properly fix the FIPS issue.
Seems I must must have mixed up files in my earlier comment. On PyPi opencv_python_headless-4.14.0.94-cp37-abi3-manylinux_2_28_x86_64.whl has OpenSSL 1.1.1k FIPS 25 Mar 2021 while opencv_python_headless-4.14.0.94-cp37-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl has OpenSSL 1.1.1w 11 Sep 2023. The OpenSSL 1.1.1k FIPS 25 Mar 2021 seems to be on quay.io/pypa/manylinux_2_28_x86_64 and comes from the openssl-libs package.
Activity
aviralgarg05 commentedon Jan 24, 2026
I would like to solve the issue, please assign me
AdityaMishra3000 commentedon Jan 24, 2026
I opened a PR that addresses this issue by removing bundled OpenSSL from the
manylinux build and relying on system OpenSSL instead.
PR:#1190
@vmiller987 Let me know if this is satisfactory
asmorkalov commentedon Jan 26, 2026
OpenCV does not use OpenSSL and does not contain any crypto related code. The SSL is 3rdparty dependency for one or several OpenCV 3rdparty dependencies, e.g. FFmpeg, QT, image IO libraries.
asmorkalov commentedon Jan 26, 2026
Mowing the issue to opencv-python repo as it's related to packages build, but not OpenCV itself.
vmiller987 commentedon Jan 26, 2026
@AdityaMishra3000 , @asmorkalov , thank you for the fast responses. I am not used to this.
The #1190 PR would appear to resolve my issue.
I pulled your branch, built the wheel, and installed it.
AdityaMishra3000 commentedon Jan 26, 2026
Hello @asmorkalov , I am new to these procedures. Thanks for the clarification.
I agree this is not OpenCV core but a 3rdparty issue. Let me know if you’d like me to adjust anything
in the PR or if there’s a preferred direction for handling this.
jayteaftw commentedon Feb 4, 2026
+1 Anything we can do to get #1190 pushed? FIPS Compliant machine are currently running with a critical vulnerability until this is addressed: GHSA-4r2x-xpjr-7cvv
Fix FIPS selftest crash by pinning opencv-python-headless to 4.12.0.88
Fix FIPS selftest crash by pinning opencv-python-headless (#96)
c-schoenherr commentedon May 4, 2026
@asmorkalov a review of #1190 would be greatly appreciated, it looks like someone approved the PR who is not an actual maintainer of the project.
mulhamfetna commentedon May 6, 2026
This is a security-critical issue affecting FIPS-compliant systems (government/enterprise).
Root cause: OpenCV's bundled OpenSSL is linked in a way that triggers FIPS selftest failure. This is likely because:
Potential fixes:
enable-fipsflagObservation: Downgrading to 4.12.0.88 works. This suggests a change between those versions affecting OpenSSL linkage.
Related: This issue is similar to CVE concerns - I noticed issue #1186 about bundled libpng CVE. Security build configurations may need review.
I have experience debugging OpenCV build issues. What build configuration changed between 4.12 and 4.13 that could affect OpenSSL?
5 remaining items
asmorkalov commentedon Aug 20, 2026
I apologize for late response, too many things are going on in parallel. It's time to bring more facts to make a decision.
readelf -dexample for opencv-python 5.0.0:Even manylinux 2014 does not include OpenSSL into list of guarantied system libraries: proof. It means that OpenSSL have to be included into distributed wheel and will be a subject of FIPS anyway.
OpenCV environment for python packages build does not use OpenSSL provided by system package manager. It's too old and we are not sure about security issues there. OpenCV built own instance of latest OpenSSL library during docker image build: https://github.com/opencv/opencv-python/blob/2ba8bf62f2f1215ab620416b041c9659005fa25c/docker/manylinux2014/Dockerfile_x86_64#L64OpenSSL security concerns from OpenCV-Python users: There is a vulnerability in the library that Opencv-python depends on. #614, Vulnerable shared libraries might make opencv-python vulnerable. Can you help upgrade to patch versions? #646.
kohtala commentedon Aug 21, 2026
Thanks for taking a look @asmorkalov .
The OpenSSL build in the openssl-python and -headless wheels at PyPi since 4.13.0.90 is
OpenSSL 1.1.1k FIPS 25 Mar 2021. It has got downgraded from theOpenSSL 1.1.1w 11 Sep 2023build until 4.12.0.88 and acquired the FIPS support in it.You can see the same in your listing
The wheel on PyPi is not the same as built here on this repository.For example the opencv_python_headless-4.14.0.94-cp37-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl on PyPi is not the same as built on the build #141. The whl artifact on this build 141 contains OpenSSL buildOpenSSL 1.1.1w 11 Sep 2023, which would be what we are expecting and would not have this issue since it has no FIPS compiled in it.To get this fixed, you need to find out where the wheels on PyPi are built and why they use an even older openssl. It is not built from the sources and versions in this repository.*[Update: I must have mixed up some files. opencv_python_headless-4.14.0.94-cp37-abi3-manylinux_2_28_x86_64.whl has OpenSSL 1.1.1k FIPS 25 Mar 2021 while opencv_python_headless-4.14.0.94-cp37-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl has OpenSSL 1.1.1w 11 Sep 2023]
(Another issue then is that the OpenSSL 1.1.1w being targeted went EOL in 2023 and unless there is paid extended support, there is none. If someone is concerned about vulnerabilities, it should be upgraded to a version that is still supported.)
vivek-koul commentedon Aug 22, 2026
do we have any workaround for this?
Use trusted publishing
Use trusted publishing
kohtala commentedon Aug 23, 2026
I drafted a change PR #1264 to migrate to PyPi Trusted Publishing. Your workflows seem to now use long lived secrets. They also fail to release installing twine.
Using pypa/gh-action-pypi-publish would come a number of improvements:
I believe this kind of change would solve this issue.
Use trusted publishing
Use trusted publishing
tvasenin commentedon Oct 26, 2026
@asmorkalov
This is actually currently not true for
manylinux_2_28:https://github.com/opencv/opencv-python/blob/90/docker/manylinux_2_28/Dockerfile_x86_64#L18
Unlike
manylinux2014(where things happen exactly as you say),manylinux_2_28installs system OpenSSL and does not build its own vanilla version.If you copy the relevant OpenSSL download/build section from
manylinux2014tomanylinux_2_28, it should properly fix the FIPS issue.PR with the fix: #1281
kohtala commentedon Oct 27, 2026
Seems I must must have mixed up files in my earlier comment. On PyPi
opencv_python_headless-4.14.0.94-cp37-abi3-manylinux_2_28_x86_64.whlhasOpenSSL 1.1.1k FIPS 25 Mar 2021whileopencv_python_headless-4.14.0.94-cp37-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whlhasOpenSSL 1.1.1w 11 Sep 2023. The OpenSSL 1.1.1k FIPS 25 Mar 2021 seems to be onquay.io/pypa/manylinux_2_28_x86_64and comes from the openssl-libs package.So yes, this patch could be the fix.
Pin opencv-python-headless below 4.13 on Linux, so Cellpose starts on…
johnthagen commentedon Nov 5, 2026
This could be another small motivation for
Users who don't need FFmpeg capabilties could use a more minimal wheel without this and the transitive dependency on:
Link OpenSSL statically into FFmpeg on manylinux_2_28
Update FFmpeg to 9.0.2, build own OpenSSL on manylinux_2_28, Docker i…
Update FFmpeg to 9.0.2, build own OpenSSL on manylinux_2_28, Docker i…