CVE-2017-1000246: Weak Encryption in pysaml2

pysaml2 Updated 02 Oct 2025

Summary

17/11/2017
Yes i
Moderate
5.3

CVE-2017-1000246: Python package pysaml2 version 4.4.0 and earlier reuses the initialization vector across encryptions in the IDP server, resulting in weak encryption of data. Affects pysaml2 versions < 4.6.0. Fixed in 4.6.0. How to fix ↓

Also tracked for

The same CVE-2017-1000246 is tracked separately for each ecosystem and vendor. Its fix information is the same; the package and affected versions differ.

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

Background

pysaml2 is a Python package available on PyPI that provides functionality for implementing SAML2 service providers and identity providers. It is widely used for integrating SAML2-based authentication and authorization into Python applications. However, versions 4.4.0 and earlier of pysaml2 suffer from a vulnerability that results in weak encryption of data. This vulnerability arises from the reuse of the initialization vector (IV) across encryptions in the IDP server.

Vulnerability Detail

The vulnerability in pysaml2 version 4.4.0 and earlier allows an attacker to exploit weak encryption of data. By reusing the IV, the encryption becomes predictable and susceptible to attacks. This can lead to unauthorized access to sensitive information, such as user credentials or session data. The impact of this vulnerability can be severe, compromising the security and integrity of the SAML2-based authentication and authorization process.

How To Fix

Minimum fixed version

4.6.0

This is the first release that contains the fix.

pip install --upgrade "pysaml2==4.6.0"

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

There is no specific workaround mentioned for this vulnerability. However, implementing additional security measures such as using a secure transport layer (e.g., HTTPS) and regularly monitoring and auditing the SAML2 implementation can help mitigate the risk associated with this vulnerability.

Conclusion

The vulnerability in pysaml2 version 4.4.0 and earlier exposes weak encryption of data, potentially leading to unauthorized access to sensitive information. To mitigate this vulnerability, it is crucial to upgrade to version 4.6.0 or later of pysaml2. Implementing additional security measures and regularly monitoring the SAML2 implementation can further enhance the security of the system. For further support on vulnerability remediation, you can reach out to DevNack.com.

See every vulnerability recorded for pysaml2 →

Share this vulnerability

FAQ

pysaml2 is a Python package that provides functionality for implementing SAML2 service providers and identity providers. It is commonly used for integrating SAML2-based authentication and authorization into Python applications.

The vulnerability allows for weak encryption of data, potentially leading to unauthorized access to sensitive information and compromising the security and integrity of the SAML2-based authentication and authorization process.

To fix this vulnerability, it is recommended to upgrade to version 4.6.0 or later of pysaml2. This upgrade includes changes to ensure that a unique initialization vector (IV) is used for each encryption, strengthening the encryption process and mitigating the vulnerability.

While no specific workaround is mentioned for this vulnerability, implementing additional security measures such as using a secure transport layer (e.g., HTTPS) and regularly monitoring and auditing the SAML2 implementation can help mitigate the risk associated with this vulnerability.

For more information about this vulnerability, you can refer to the official advisory in the PyPI advisory database: https://github.com/pypa/advisory-database/blob/main/vulns/pysaml2/PYSEC-2017-26.yaml

Related vulnerabilities

Recent vulnerabilities recorded for pysaml2.

Sponsored Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

How To Fix

Minimum fixed version

4.6.0

This is the first release that contains the fix.

pip install --upgrade "pysaml2==4.6.0"

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback