Skip to content

GHSA-mqqv-chpx-vq25 CVE-2020-7711 CVE-2020-7731 GHSA-gq5r-cc4w-g8xf GHSA-prjq-f4q3-fvfr GO-2020-0046 SNYK-GOLANG-GITHUBCOMRUSSELLHAERINGGOSAML2-608302

goxmldsig vulnerable to crash on nil-pointer dereference caused by sending malformed XML signatures

High Go
Severity
7.5 / 10
High · CVSS 3.1
Exploit chance (EPSS)
1.80%
Chance of exploitation in the next 30 days. Higher than 78.55% of scored vulnerabilities.
Known exploited
No
Not in CISA's catalog
Weakness
CWE-476 NULL Pointer Dereference
Fix
Available
2 packages have a fixed version

Description

This affects all versions of package github.com/russellhaering/goxmldsig prior to 1.1.1. There is a crash on nil-pointer dereference caused by sending malformed XML signatures. This issue is patched in version 1.1.1.

Affected versions

Go

PackageVulnerableFixed in
github.com/russellhaering/gosaml2
< 0.7.0
0.7.0
github.com/russellhaering/goxmldsig
< 1.1.1
1.1.1

How to fix

Move to the fixed version or later with your package manager, update the lockfile, and run your tests. If the package only arrives through another dependency, upgrade that dependency first. If none of its releases pulls a fixed version yet, force the version with your package manager's override.

github.com/russellhaering/gosaml2 Go → 0.7.0

go
go get github.com/russellhaering/gosaml2@v0.7.0 && go mod tidy

github.com/russellhaering/goxmldsig Go → 1.1.1

go
go get github.com/russellhaering/goxmldsig@v1.1.1 && go mod tidy

Severity breakdown

CVSS 3.1 7.5

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Attack vector
Network
Attack complexity
Low
Privileges required
None
User interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
High

Weakness

CWE-476: NULL Pointer Dereference

The product dereferences a pointer that it expects to be valid but is NULL.

How to prevent it
  • Implementation: For any pointers that could have been modified or provided from a function that can return NULL, check the pointer for NULL before use. When working with a multithreaded or otherwise asynchronous environment, ensure that proper locking APIs are used to lock before the check, and unlock when it has finished [REF-1484].
  • Requirements: Select a programming language that is not susceptible to these issues.
  • Implementation: Check the results of all functions that return a value and verify that the value is non-null before acting upon it.
  • Architecture and Design: Identify all variables and data stores that receive information from external sources, and apply input validation to make sure that they are only initialized to expected values.
  • Implementation: Explicitly initialize all variables and other data stores, either during declaration or just before the first usage.

References

Timeline

  1. Published
  2. Last updated by the source
  3. Latest EPSS score
AdvisorySeverityWhy it's related
GHSA-479m-364c-43vc
validateSignature Loop Variable Capture Signature Bypass in goxmldsig
High Also affects github.com/russellhaering/goxmldsig
GHSA-rrfw-hg9m-j47h
Signature Validation Bypass
Critical Also affects github.com/russellhaering/goxmldsig
GHSA-q547-gmf8-8jr7
github.com/russellhaering/goxmldsig vulnerable to Signature Validation Bypass
Medium Also affects github.com/russellhaering/goxmldsig
GHSA-m9hp-7r99-94h5
Authentication Bypass in dex
Critical Also affects github.com/russellhaering/goxmldsig
GHSA-525v-9gp9-w22h
Forge: TLS client crash when the server sends no certificate
Medium Same weakness, CWE-476
GHSA-8hrf-8g6f-7xwp
Forge: Denial of service in TLS record processing via a record interleaved with a fragmented handshake message
High Same weakness, CWE-476
GHSA-cp9v-662q-vvx9
Pillow: NULL pointer dereference in Image.merge via an unvalidated band 0
High Same weakness, CWE-476
GHSA-27h8-gf7j-v5hc
Pillow: NULL dereference in ImagingExpand via rank filters on zero-size images
High Same weakness, CWE-476

Credits: @stevenjohnstone

Is this in your code?

MergeHarbor checks every repository's dependencies against this database, ranks what matters by exploitability and reachability, routes it to the owning team and opens the fix pull request.

Check your repos with MergeHarbor