CVE-2020-27846: Signature validation bypass due to XML processing error in github.com/crewjam/saml

github.com/crewjam/saml Updated 02 Oct 2025

Summary

14/04/2021
Yes i
Critical
9.8

CVE-2020-27846: Signature validation bypass due to XML processing error in github.com/crewjam/saml. Affects github.com/crewjam/saml versions < 0.4.3. Fixed in 0.4.3. How to fix ↓

Also tracked for

The same CVE-2020-27846 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

Sponsored Devnack Your last release was probably never penetration tested Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

The github.com/crewjam/saml package is a Go library that provides functionality for working with SAML (Security Assertion Markup Language) in both Identity Provider (IdP) and Service Provider (SP) roles. It includes features such as serving SSO (Single Sign-On) requests, validating authentication requests, parsing SAML responses, and validating logout responses. The package is widely used in Go applications for implementing SAML-based authentication and authorization.

Vulnerability Detail

The vulnerability (CVE-2020-27846) arises from the behavior of encoding/xml in the github.com/crewjam/saml package. A specially crafted XML document can exploit an XML Digital Signature processing error, leading to the complete bypass of signature validation. As a result, an unsigned document can appear as if it is signed, potentially allowing unauthorized access or tampering with sensitive information. This vulnerability affects versions 0.0.0 to 0.4.2 of the github.com/crewjam/saml package.

How To Fix

Latest published version: v0.5.1 as of 23 Oct 2026

go get github.com/crewjam/saml@v0.5.1

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

0.4.3

This is the first release that contains the fix.

go get github.com/crewjam/saml@v0.4.3

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

Workaround

There is no known workaround for this vulnerability. It is essential to upgrade to the fixed version of the github.com/crewjam/saml package to mitigate the risk.

Conclusion

The vulnerability (CVE-2020-27846) in the github.com/crewjam/saml package allows for the bypass of signature validation in SAML documents. It is crucial for developers to upgrade to version 0.4.3 or later of the package to mitigate the risk. No known workarounds exist for this vulnerability. For further support on vulnerability remediation, contact DevNack.com.

See every vulnerability recorded for github.com/crewjam/saml →

Share this vulnerability

FAQ

The vulnerability allows an attacker to bypass signature validation in SAML documents, potentially leading to unauthorized access or tampering with sensitive information.

You can use the Vulert Playground (https://vulert.com/scanner) to check if your application is affected by this vulnerability. It analyzes your Gopkg.lock file and provides real-time alerts for open-source vulnerabilities.

No, only versions 0.0.0 to 0.4.2 of the github.com/crewjam/saml package are affected. Version 0.4.3 and later include a fix for the vulnerability.

No, there is no known workaround. It is crucial to upgrade to the fixed version of the github.com/crewjam/saml package.

You can find more information about this vulnerability in the CVE-2020-27846 entry and the associated GitHub Security Advisory (GHSA-4hq8-gmxx-h6w9).

References

Related vulnerabilities

Recent vulnerabilities recorded for github.com/crewjam/saml.

How To Fix

Latest published version: v0.5.1 as of 23 Oct 2026

go get github.com/crewjam/saml@v0.5.1

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

0.4.3

This is the first release that contains the fix.

go get github.com/crewjam/saml@v0.4.3

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