CVE-2021-24031
In the Zstandard command-line utility prior to v1.4.1, output files were created with default...
In the Zstandard command-line utility prior to v1.4.1, output files were created with default permissions. Correct file permissions (matching the input) would only be set at completion time. Output files could therefore be readable or writable to unintended parties.
Attack profile
How easy it is to exploit
- Attack vector
- Local
- Complexity
- Low
- Privileges needed
- Low
- User interaction
- None
What an attacker can affect
- Confidentiality
- High
- Integrity
- None
- Availability
- None
Exploit likelihood
What each source reports
NVD Score used
5.5
In the Zstandard command-line utility prior to v1.4.1, output files were created with default permissions. Correct file permissions (matching the input) would only be set at completion time. Output files could therefore be readable or writable to unintended parties.
- Record
CVE-2021-24031- CVSS 3.1
- 5.5 Medium
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N - CVSS 2.0
- 2.1 Low
AV:L/AC:L/Au:N/C:P/I:N/A:N - Weakness
- CWE-277, CWE-276
- Updated
- 2026-11-02
CVE List No score
In the Zstandard command-line utility prior to v1.4.1, output files were created with default permissions. Correct file permissions (matching the input) would only be set at completion time. Output files could therefore be readable or writable to unintended parties.
- Record
CVE-2021-24031- Weakness
- CWE-277
- Updated
- 2026-11-02
EUVDEUVD-2021-10951 No score
In the Zstandard command-line utility prior to v1.4.1, output files were created with default permissions. Correct file permissions (matching the input) would only be set at completion time. Output files could therefore be readable or writable to unintended parties.
- Record
EUVD-2021-10951- Updated
- 2026-11-03
GitHub AdvisoriesGHSA-5mqj-v3fr-pg3x No score
In the Zstandard command-line utility prior to v1.4.1, output files were created with default...
In the Zstandard command-line utility prior to v1.4.1, output files were created with default permissions. Correct file permissions (matching the input) would only be set at completion time. Output files could therefore be readable or writable to unintended parties.
- Record
GHSA-5mqj-v3fr-pg3x- Weakness
- CWE-276
- Updated
- 2026-11-02
OSVALPINE-CVE-2021-24031
5.5
In the Zstandard command-line utility prior to v1.4.1, output files were created with default permissions. Correct file permissions (matching the input) would only be set at completion time. Output files could therefore be readable or writable to unintended parties.
- Record
ALPINE-CVE-2021-24031- CVSS 3.1
- 5.5 Medium
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N - Updated
- 2026-11-02
OSVBELL-CVE-2021-24031
5.5
CVE-2021-24031 does not affect BellSoft software
- Record
BELL-CVE-2021-24031- CVSS 3.1
- 5.5 Medium
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N - Updated
- 2026-11-02
Show 8 moreShow less
OSV
5.5
In the Zstandard command-line utility prior to v1.4.1, output files were created with default permissions. Correct file permissions (matching the input) would only be set at completion time. Output files could therefore be readable or writable to unintended parties.
- Record
CVE-2021-24031- CVSS 3.1
- 5.5 Medium
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N - Updated
- 2026-11-02
OSVDEBIAN-CVE-2021-24031
5.5
In the Zstandard command-line utility prior to v1.4.1, output files were created with default permissions. Correct file permissions (matching the input) would only be set at completion time. Output files could therefore be readable or writable to unintended parties.
- Record
DEBIAN-CVE-2021-24031- CVSS 3.1
- 5.5 Medium
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N - Updated
- 2026-11-02
OSVUBUNTU-CVE-2021-24031
5.5
In the Zstandard command-line utility prior to v1.4.1, output files were created with default permissions. Correct file permissions (matching the input) would only be set at completion time. Output files could therefore be readable or writable to unintended parties.
- Record
UBUNTU-CVE-2021-24031- CVSS 3.1
- 5.5 Medium
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N - Updated
- 2026-11-02
OSVMGASA-2021-0322 No score
Updated zstd packages fix a security vulnerability
In the Zstandard command-line utility prior to v1.4.1, output files were created with default permissions. Correct file permissions (matching the input) would only be set at completion time. Output files could therefore be readable or writable to unintended parties (CVE-2021-24031).
- Record
MGASA-2021-0322- Updated
- 2026-11-02
OSVopenSUSE-SU-2021:0481-1 No score
Security update for zstd
This update for zstd fixes the following issues:
- CVE-2021-24031: Added read permissions to files while being compressed or uncompressed (bsc#1183371).
- CVE-2021-24032: Fixed a race condition which could have allowed an attacker to access world-readable destination file (bsc#1183370).
This update was imported from the SUSE:SLE-15:Update update project.
- Record
openSUSE-SU-2021:0481-1- Updated
- 2026-11-02
OSVSUSE-SU-2021:0948-1 No score
Security update for zstd
This update for zstd fixes the following issues:
- CVE-2021-24031: Added read permissions to files while being compressed or uncompressed (bsc#1183371).
- CVE-2021-24032: Fixed a race condition which could have allowed an attacker to access world-readable destination file (bsc#1183370).
- Record
SUSE-SU-2021:0948-1- Updated
- 2026-11-02
OSVUSN-4760-1 No score
libzstd vulnerabilities
It was discovered that libzstd incorrectly handled file permissions. A local attacker could possibly use this issue to access certain files, contrary to expectations.
- Record
USN-4760-1- Updated
- 2026-11-02
OSVUSN-5720-1 No score
libzstd vulnerabilities
It was discovered that Zstandard was not properly managing file permissions when generating output files. A local attacker could possibly use this issue to cause a race condition and gain unauthorized access to sensitive data.
- Record
USN-5720-1- Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
zstdAlpine:v3.14 |
before 1.4.1-r0 | 1.4.1-r0 |
zstdAlpine:v3.15 |
before 1.4.1-r0 | 1.4.1-r0 |
zstdAlpine:v3.16 |
before 1.4.1-r0 | 1.4.1-r0 |
zstdAlpine:v3.17 |
before 1.4.1-r0 | 1.4.1-r0 |
zstdAlpine:v3.18 |
before 1.4.1-r0 | 1.4.1-r0 |
zstdAlpine:v3.19 |
before 1.4.1-r0 | 1.4.1-r0 |
zstdAlpine:v3.20 |
before 1.4.1-r0 | 1.4.1-r0 |
zstdAlpine:v3.21 |
before 1.4.1-r0 | 1.4.1-r0 |
zstdAlpine:v3.22 |
before 1.4.1-r0 | 1.4.1-r0 |
zstdAlpine:v3.23 |
before 1.4.1-r0 | 1.4.1-r0 |
Show 16 moreShow less
| Package | Affected | Fixed |
|---|---|---|
zstdAlpine:v3.24 |
before 1.4.1-r0 | 1.4.1-r0 |
libzstdDebian:12 |
before 1.4.8+dfsg-1 | 1.4.8+dfsg-1 |
libzstdDebian:13 |
before 1.4.8+dfsg-1 | 1.4.8+dfsg-1 |
libzstdDebian:14 |
before 1.4.8+dfsg-1 | 1.4.8+dfsg-1 |
libzstdDebian:9 |
before 1.1.2-1+deb9u1, plus listed versions 1.1.2-1 |
1.1.2-1+deb9u1 |
libzstdDebian:10 |
before 1.3.8+dfsg-3+deb10u1, plus listed versions 1.3.8+dfsg-3 |
1.3.8+dfsg-3+deb10u1 |
zstdMageia:7 |
before 1.4.0-1.1.mga7 | 1.4.0-1.1.mga7 |
zstdSUSE:Linux Enterprise Module for Basesystem 15 SP2 From an advisory covering 2 CVEs |
before 1.4.4-1.6.1 | 1.4.4-1.6.1 |
zstdSUSE:Linux Enterprise Micro 5.0 From an advisory covering 2 CVEs |
before 1.4.4-1.6.1 | 1.4.4-1.6.1 |
libzstdUbuntu:Pro:16.04:LTS |
before 1.3.1+dfsg-1~ubuntu0.16.04.1+esm3, plus listed versions 0.4.5-10.5.1-11.3.1+dfsg-1~ubuntu0.16.04.11.3.1+dfsg-1~ubuntu0.16.04.1+esm11.3.1+dfsg-1~ubuntu0.16.04.1+esm2 |
1.3.1+dfsg-1~ubuntu0.16.04.1+esm3 |
libzstdUbuntu:18.04:LTS |
before 1.3.3+dfsg-2ubuntu1.2, plus listed versions 1.3.1+dfsg-11.3.2+dfsg-11.3.2+dfsg2-11.3.3+dfsg-11.3.3+dfsg-1ubuntu11.3.3+dfsg-2ubuntu11.3.3+dfsg-2ubuntu1.1 |
1.3.3+dfsg-2ubuntu1.2 |
libzstdUbuntu:20.04:LTS |
before 1.4.4+dfsg-3ubuntu0.1, plus listed versions 1.4.3+dfsg-11.4.4+dfsg-11.4.4+dfsg-3 |
1.4.4+dfsg-3ubuntu0.1 |
libzstdUbuntu:18.04:LTS From an advisory covering 2 CVEs |
before 1.3.3+dfsg-2ubuntu1.2, plus listed versions 1.3.1+dfsg-11.3.2+dfsg-11.3.2+dfsg2-11.3.3+dfsg-11.3.3+dfsg-1ubuntu11.3.3+dfsg-2ubuntu11.3.3+dfsg-2ubuntu1.1 |
1.3.3+dfsg-2ubuntu1.2 |
libzstdUbuntu:20.04:LTS From an advisory covering 2 CVEs |
before 1.4.4+dfsg-3ubuntu0.1, plus listed versions 1.4.3+dfsg-11.4.4+dfsg-11.4.4+dfsg-3 |
1.4.4+dfsg-3ubuntu0.1 |
libzstdUbuntu:Pro:16.04:LTS From an advisory covering 2 CVEs |
before 1.3.1+dfsg-1~ubuntu0.16.04.1+esm3, plus listed versions 0.4.5-10.5.1-11.3.1+dfsg-1~ubuntu0.16.04.11.3.1+dfsg-1~ubuntu0.16.04.1+esm11.3.1+dfsg-1~ubuntu0.16.04.1+esm2 |
1.3.1+dfsg-1~ubuntu0.16.04.1+esm3 |
zstdopenSUSE:Leap 15.2 From an advisory covering 2 CVEs |
before 1.4.4-lp152.2.3.1 | 1.4.4-lp152.2.3.1 |
History
| Recorded | Changed | Sources |
|---|---|---|
| affected, facts | ||
| aliases | EUVD | |
| first indexed | CVE List, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2021-24031 is a medium vulnerability (CVSS 5.5) in Facebook Zstandard, published February 10, 2021. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.46%, the 40th percentile. Fixed in zstd 1.4.1-r0.
References
github.com/facebook/zstd/issues/1630
bugs.debian.org/cgi-bin/bugreport.cgi?bug=981404
facebook.com/security/advisories/cve-2021-24031
nvd.nist.gov/vuln/detail/CVE-2021-24031
github.com/advisories/GHSA-5mqj-v3fr-pg3x
security.alpinelinux.org/vuln/CVE-2021-24031
Show 15 moreShow less
docs.bell-sw.com/security/cves/CVE-2021-24031
security-tracker.debian.org/tracker/CVE-2021-24031
advisories.mageia.org/MGASA-2021-0322.html
bugs.mageia.org/show_bug.cgi?id=28444
ubuntu.com/security/notices/USN-4760-1
suse.com/support/update/announcement/2021/suse-su-20210948-1
bugzilla.suse.com/1183370
bugzilla.suse.com/1183371
suse.com/security/cve/CVE-2021-24031
suse.com/security/cve/CVE-2021-24032
ubuntu.com/security/CVE-2021-24031
ubuntu.com/security/notices/USN-5720-1
cve.org/CVERecord?id=CVE-2021-24031
ubuntu.com/security/CVE-2021-24032
lists.opensuse.org/archives/list/[email protected]/thread/HYCURYHE4SZBA5XWHE6FDNCJ3JJDZS5S