Every CVE Search/ Get API key

CVE-2021-24031

In the Zstandard command-line utility prior to v1.4.1, output files were created with default...

5.5 MediumFix available

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

0.46%Down 0.4 points since Apr 14, 2021
90%50%10%1%

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 MediumCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N
CVSS 2.0
2.1 LowAV: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 MediumCVSS: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 MediumCVSS: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 MediumCVSS: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 MediumCVSS: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 MediumCVSS: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

Affected packages
PackageAffectedFixed
zstd
Alpine:v3.14
before 1.4.1-r0
1.4.1-r0
zstd
Alpine:v3.15
before 1.4.1-r0
1.4.1-r0
zstd
Alpine:v3.16
before 1.4.1-r0
1.4.1-r0
zstd
Alpine:v3.17
before 1.4.1-r0
1.4.1-r0
zstd
Alpine:v3.18
before 1.4.1-r0
1.4.1-r0
zstd
Alpine:v3.19
before 1.4.1-r0
1.4.1-r0
zstd
Alpine:v3.20
before 1.4.1-r0
1.4.1-r0
zstd
Alpine:v3.21
before 1.4.1-r0
1.4.1-r0
zstd
Alpine:v3.22
before 1.4.1-r0
1.4.1-r0
zstd
Alpine:v3.23
before 1.4.1-r0
1.4.1-r0
Show 16 moreShow less
Affected packages
PackageAffectedFixed
zstd
Alpine:v3.24
before 1.4.1-r0
1.4.1-r0
libzstd
Debian:12
before 1.4.8+dfsg-1
1.4.8+dfsg-1
libzstd
Debian:13
before 1.4.8+dfsg-1
1.4.8+dfsg-1
libzstd
Debian:14
before 1.4.8+dfsg-1
1.4.8+dfsg-1
libzstd
Debian:9
before 1.1.2-1+deb9u1, plus listed versions
1.1.2-1
1.1.2-1+deb9u1
libzstd
Debian:10
before 1.3.8+dfsg-3+deb10u1, plus listed versions
1.3.8+dfsg-3
1.3.8+dfsg-3+deb10u1
zstd
Mageia:7
before 1.4.0-1.1.mga7
1.4.0-1.1.mga7
zstd
SUSE: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
zstd
SUSE:Linux Enterprise Micro 5.0
From an advisory covering 2 CVEs
before 1.4.4-1.6.1
1.4.4-1.6.1
libzstd
Ubuntu: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
libzstd
Ubuntu: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
libzstd
Ubuntu: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
libzstd
Ubuntu: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
libzstd
Ubuntu: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
libzstd
Ubuntu: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
zstd
openSUSE: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

History
RecordedChangedSources
affected, facts
aliasesEUVD
first indexedCVE 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

Show 15 moreShow less
MoveEnter Open