CVE-2017-1000433
Description
pysaml2 version 4.4.0 and older accept any password when run with python optimizations enabled. This allows attackers to log in as any user without knowing their password.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
pysaml2 <=4.4.0 accepts any password when Python optimizations are enabled, allowing authentication bypass.
## Vulnerability pysaml2 versions 4.4.0 and older accept any password when run with Python optimizations enabled (e.g., PYTHONOPTIMIZE or -O flag). This occurs because the password validation logic relied on assert statements, which are removed during optimization, causing the check to be skipped entirely [1][2].
Exploitation
An attacker can log in as any user without knowing the correct password. The only prerequisite is that the application using pysaml2 is running with Python optimizations enabled. No authentication or user interaction is required beyond submitting a login request with arbitrary password [1][2].
Impact
Successful exploitation results in complete authentication bypass. The attacker gains access to any user account within the SAML2-enabled application, potentially leading to unauthorized access to sensitive data or actions [1][2].
Mitigation
The vulnerability is fixed in pysaml2 version 4.5.0. Users should upgrade immediately. If upgrading is not possible, ensure that Python optimizations are disabled (i.e., avoid using -O or PYTHONOPTIMIZE environment variable) [1][2]. No known workaround exists that preserves optimization while fixing the bug.
AI Insight generated on May 22, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.
Affected packages
Versions sourced from the GitHub Security Advisory.
| Package | Affected versions | Patched versions |
|---|---|---|
pysaml2PyPI | < 4.5.0 | 4.5.0 |
Affected products
16- ghsa-coords16 versionspkg:pypi/pysaml2pkg:rpm/suse/caasp-openstack-heat-templates&distro=SUSE%20OpenStack%20Cloud%207pkg:rpm/suse/crowbar-core&distro=SUSE%20Enterprise%20Storage%204pkg:rpm/suse/crowbar-core&distro=SUSE%20OpenStack%20Cloud%207pkg:rpm/suse/crowbar&distro=SUSE%20Enterprise%20Storage%204pkg:rpm/suse/crowbar&distro=SUSE%20OpenStack%20Cloud%207pkg:rpm/suse/crowbar-ha&distro=SUSE%20OpenStack%20Cloud%207pkg:rpm/suse/crowbar-openstack&distro=SUSE%20OpenStack%20Cloud%207pkg:rpm/suse/galera-python-clustercheck&distro=SUSE%20OpenStack%20Cloud%207pkg:rpm/suse/openstack-ceilometer&distro=SUSE%20OpenStack%20Cloud%207pkg:rpm/suse/openstack-ceilometer-doc&distro=SUSE%20OpenStack%20Cloud%207pkg:rpm/suse/openstack-heat-gbp&distro=SUSE%20OpenStack%20Cloud%207pkg:rpm/suse/python-PyKMIP&distro=SUSE%20OpenStack%20Cloud%207pkg:rpm/suse/python-pysaml2&distro=SUSE%20OpenStack%20Cloud%207pkg:rpm/suse/rubygem-crowbar-client&distro=SUSE%20Enterprise%20Storage%204pkg:rpm/suse/rubygem-crowbar-client&distro=SUSE%20OpenStack%20Cloud%207
< 4.5.0+ 15 more
- (no CPE)range: < 4.5.0
- (no CPE)range: < 1.0+git.1553079189.3bf8922-1.6.2
- (no CPE)range: < 4.0+git.1556285635.ab602dd4d-9.46.3
- (no CPE)range: < 4.0+git.1556285635.ab602dd4d-9.46.3
- (no CPE)range: < 4.0+git.1551088848.823bcaa3-7.29.2
- (no CPE)range: < 4.0+git.1551088848.823bcaa3-7.29.2
- (no CPE)range: < 4.0+git.1556181005.47c643d-4.46.3
- (no CPE)range: < 4.0+git.1554887450.ff7c30c1c-9.51.3
- (no CPE)range: < 0.0+git.1506329536.8f5878c-1.6.2
- (no CPE)range: < 7.1.1~dev4-4.15.3
- (no CPE)range: < 7.1.1~dev4-4.15.3
- (no CPE)range: < 5.1.1~dev1-2.6.3
- (no CPE)range: < 0.5.0-3.3.3
- (no CPE)range: < 4.0.2-3.3.2
- (no CPE)range: < 3.9.0-7.14.2
- (no CPE)range: < 3.9.0-7.14.2
Patches
16312a41e0379Quick fix for the authentication bypass due to optimizations #451
1 file changed · +3 −2
src/saml2/authn.py+3 −2 modified@@ -146,7 +146,8 @@ def __call__(self, cookie=None, policy_url=None, logo_url=None, return resp def _verify(self, pwd, user): - assert is_equal(pwd, self.passwd[user]) + if not is_equal(pwd, self.passwd[user]): + raise ValueError("Wrong password") def verify(self, request, **kwargs): """ @@ -176,7 +177,7 @@ def verify(self, request, **kwargs): return_to = create_return_url(self.return_to, _dict["query"][0], **{self.query_param: "true"}) resp = Redirect(return_to, headers=[cookie]) - except (AssertionError, KeyError): + except (ValueError, KeyError): resp = Unauthorized("Unknown user or wrong password") return resp
Vulnerability mechanics
Generated on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.
References
9- github.com/advisories/GHSA-924m-4pmx-c67hghsaADVISORY
- nvd.nist.gov/vuln/detail/CVE-2017-1000433ghsaADVISORY
- security.gentoo.org/glsa/201801-11ghsavendor-advisoryx_refsource_GENTOOWEB
- github.com/IdentityPython/pysaml2/commit/6312a41e037954850867f29d329e5007df1424a5ghsaWEB
- github.com/IdentityPython/pysaml2/pull/454ghsaWEB
- github.com/pypa/advisory-database/tree/main/vulns/pysaml2/PYSEC-2018-48.yamlghsaWEB
- github.com/rohe/pysaml2/issues/451ghsax_refsource_CONFIRMWEB
- lists.debian.org/debian-lts-announce/2018/07/msg00000.htmlghsamailing-listx_refsource_MLISTWEB
- lists.debian.org/debian-lts-announce/2021/02/msg00038.htmlghsamailing-listx_refsource_MLISTWEB
News mentions
0No linked articles in our index yet.