Bug 1937909 (CVE-2021-27919) - CVE-2021-27919 golang: archive/zip: panic when calling Reader.Open
Summary: CVE-2021-27919 golang: archive/zip: panic when calling Reader.Open
Alias: CVE-2021-27919
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Red Hat Product Security
QA Contact:
Depends On: 1937910 1937911
Blocks: 1937912
TreeView+ depends on / blocked
Reported: 2021-03-11 17:48 UTC by Guilherme de Almeida Suckevicz
Modified: 2023-02-07 17:07 UTC (History)
65 users (show)

Fixed In Version: go 1.16.1
Doc Type: If docs needed, set a value
Doc Text:
An out of bounds read vulnerability was found in golang. When using the archive/zip standard library (stdlib) and an unexpected file is parsed, it can cause golang to attempt to read outside of a slice (array) causing a panic in the runtime. A potential attacker can use this vulnerability to craft an archive which causes an application using this library to crash resulting in a Denial of Service (DoS).
Clone Of:
Last Closed: 2021-04-22 10:46:43 UTC

Attachments (Terms of Use)

Description Guilherme de Almeida Suckevicz 2021-03-11 17:48:57 UTC
archive/zip in Go 1.16.x before 1.16.1 allows attackers to cause a denial of service (panic) upon attempted use of the Reader.Open API for a ZIP archive in which ../ occurs at the beginning of any filename.


Comment 1 Guilherme de Almeida Suckevicz 2021-03-11 17:49:29 UTC
Created golang tracking bugs for this issue:

Affects: epel-all [bug 1937910]
Affects: fedora-all [bug 1937911]

Comment 2 Mark Cooper 2021-03-15 11:13:32 UTC
The vulnerable function `Reader.Open` was only introduced in Go 1.16 [1] Hence I suspect most RH products wont be affected. 

[1] - https://github.com/golang/go/issues/44916#issue-827996397

Comment 3 Mark Cooper 2021-03-15 11:36:05 UTC
Indeed Reader.go:Open was added here https://github.com/golang/go/commit/1296ee6b4f9058be75c799513ccb488d2f2dd085#diff-0080ec4a6ff2467b5511020b725e4f633f08384e892e18103af78e4fe9912278

So that confirms that the vulnerable functions were only added in go 1.16

Comment 6 Mark Cooper 2021-03-17 00:39:41 UTC
Removed Jaeger from whiteboard as it does not include any references to the archive/zip stdlib.

Comment 7 Mark Cooper 2021-03-18 03:15:54 UTC
External References:


Comment 9 Mark Cooper 2021-03-19 04:22:59 UTC
For OpenShift Container Platform (OCP) and OpenShift ServiceMesh (OSSM) the components listed are what depend on the stdlib archive/zip. As they are compiled with an older version of golang (1.15 and earler) they have been marked not affected.

Comment 11 Product Security DevOps Team 2021-04-22 10:46:43 UTC
This bug is now closed. Further updates for individual products will be reflected on the CVE page(s):


Note You need to log in before you can comment on or make changes to this bug.