Every CVE Search/ Get API key

CVE-2021-20285

A flaw was found in upx canPack in p_lx_elf.cpp in UPX 3.96. This flaw allows attackers to cause...

6.6 MediumFix available

A flaw was found in upx canPack in p_lx_elf.cpp in UPX 3.96. This flaw allows attackers to cause a denial of service (SEGV or buffer overflow and application crash) or possibly have unspecified other impacts via a crafted ELF. The highest threat from this vulnerability is to system availability.

Attack profile

How easy it is to exploit

Attack vector
Local
Complexity
Low
Privileges needed
None
User interaction
Required

What an attacker can affect

Confidentiality
Low
Integrity
Low
Availability
High

Exploit likelihood

0.75%Unchanged since Apr 14, 2021
90%50%10%1%

What each source reports

NVD Score used 6.6

A flaw was found in upx canPack in p_lx_elf.cpp in UPX 3.96. This flaw allows attackers to cause a denial of service (SEGV or buffer overflow and application crash) or possibly have unspecified other impacts via a crafted ELF. The highest threat from this vulnerability is to system availability.

Record
CVE-2021-20285
CVSS 3.1
6.6 MediumCVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:H
CVSS 2.0
8.3 HighAV:N/AC:M/Au:N/C:P/I:P/A:C
Weakness
CWE-119, CWE-787
Updated
2026-11-02
CVE List No score

A flaw was found in upx canPack in p_lx_elf.cpp in UPX 3.96. This flaw allows attackers to cause a denial of service (SEGV or buffer overflow and application crash) or possibly have unspecified other impacts via a crafted ELF. The highest threat from this vulnerability is to system availability.

Record
CVE-2021-20285
Weakness
CWE-119
Updated
2026-11-02
EUVDEUVD-2021-7713 No score

A flaw was found in upx canPack in p_lx_elf.cpp in UPX 3.96. This flaw allows attackers to cause a denial of service (SEGV or buffer overflow and application crash) or possibly have unspecified other impacts via a crafted ELF. The highest threat from this vulnerability is to system availability.

Record
EUVD-2021-7713
Updated
2026-11-03
GitHub AdvisoriesGHSA-9235-qgm5-877x 6.6

A flaw was found in upx canPack in p_lx_elf.cpp in UPX 3.96. This flaw allows attackers to cause...

A flaw was found in upx canPack in p_lx_elf.cpp in UPX 3.96. This flaw allows attackers to cause a denial of service (SEGV or buffer overflow and application crash) or possibly have unspecified other impacts via a crafted ELF. The highest threat from this vulnerability is to system availability.

Record
GHSA-9235-qgm5-877x
CVSS 3.1
6.6 MediumCVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:H
Weakness
CWE-119, CWE-787
Updated
2026-11-02
OSVALPINE-CVE-2021-20285 6.6

A flaw was found in upx canPack in p_lx_elf.cpp in UPX 3.96. This flaw allows attackers to cause a denial of service (SEGV or buffer overflow and application crash) or possibly have unspecified other impacts via a crafted ELF. The highest threat from this vulnerability is to system availability.

Record
ALPINE-CVE-2021-20285
CVSS 3.1
6.6 MediumCVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:H
Updated
2026-11-03
OSVBELL-CVE-2021-20285 6.6

CVE-2021-20285 does not affect BellSoft software

Record
BELL-CVE-2021-20285
CVSS 3.1
6.6 MediumCVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:H
Updated
2026-11-02
Show 5 moreShow less
OSV 6.6

A flaw was found in upx canPack in p_lx_elf.cpp in UPX 3.96. This flaw allows attackers to cause a denial of service (SEGV or buffer overflow and application crash) or possibly have unspecified other impacts via a crafted ELF. The highest threat from this vulnerability is to system availability.

Record
CVE-2021-20285
CVSS 3.1
6.6 MediumCVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:H
Updated
2026-11-02
OSVDEBIAN-CVE-2021-20285 6.6

A flaw was found in upx canPack in p_lx_elf.cpp in UPX 3.96. This flaw allows attackers to cause a denial of service (SEGV or buffer overflow and application crash) or possibly have unspecified other impacts via a crafted ELF. The highest threat from this vulnerability is to system availability.

Record
DEBIAN-CVE-2021-20285
CVSS 3.1
6.6 MediumCVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:H
Updated
2026-11-02
OSVUBUNTU-CVE-2021-20285 6.6

A flaw was found in upx canPack in p_lx_elf.cpp in UPX 3.96. This flaw allows attackers to cause a denial of service (SEGV or buffer overflow and application crash) or possibly have unspecified other impacts via a crafted ELF. The highest threat from this vulnerability is to system availability.

Record
UBUNTU-CVE-2021-20285
CVSS 3.1
6.6 MediumCVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:H
Updated
2026-11-02
OSVMGASA-2021-0241 No score

Updated upx packages fix security vulnerabilities

The updated package fixes security vulnerabilities:

A heap buffer overflow read was discovered in upx 4.0.0, because the check in p_lx_elf.cpp is not perfect. (CVE-2020-24119)

A flaw was found in upx canPack in p_lx_elf.cpp in UPX 3.96. This flaw allows attackers to cause a denial of service (SEGV or buffer overflow and application crash) or possibly have unspecified other impacts via a crafted ELF. The highest threat from this vulnerability is to system availability. (CVE-2021-20285)

Record
MGASA-2021-0241
Updated
2026-11-02
OSVopenSUSE-SU-2023:0088-1 No score

Security update for upx

upx was updated to fix the following issues:

Update to release 4.0.2

  • Fix unpack of ELF x86-64 that failed with 'CantUnpackException: corrupt b_info'
  • Resolve SEGV on PackLinuxElf64::invert_pt_dynamic
  • CVE-2021-30500: Fixed Null pointer dereference in PackLinuxElf:canUnpack() in p_lx_elf.cpp
  • CVE-2021-30501: Fixed Assertion abort in function MemBuffer:alloc()
  • CVE-2021-43311: Fixed Heap-based buffer overflow in PackLinuxElf32:elf_lookup() at p_lx_elf.cpp
  • CVE-2021-43312: Fixed Heap-based buffer overflow in PackLinuxElf64:invert_pt_dynamic at p_lx_elf.cpp:5239
  • CVE-2021-43313: Fixed Heap-based buffer overflow in PackLinuxElf32:invert_pt_dynamic at p_lx_elf.cpp:1688
  • CVE-2021-43314: Fixed Heap-based buffer overflows in PackLinuxElf32:elf_lookup() at p_lx_elf.cp
  • CVE-2021-43315: Fixed Heap-based buffer overflows in PackLinuxElf32:elf_lookup() at p_lx_elf.cp
  • CVE-2021-43316: Fixed Heap-based buffer overflow in func get_le64()
  • CVE-2021-43317: Fixed Heap-based buffer overflows in PackLinuxElf64:elf_lookup() at p_lx_elf.cp
  • CVE-2023-23456: Fixed heap-buffer-overflow in PackTmt:pack()
  • CVE-2023-23457: Fixed SEGV on PackLinuxElf64:invert_pt_dynamic() in p_lx_elf.cpp
Record
openSUSE-SU-2023:0088-1
Updated
2026-11-02

Affected products

Affected packages

Affected packages
PackageAffectedFixed
upx
Alpine:v3.13
before 3.96-r1
3.96-r1
upx
Alpine:v3.14
before 3.96-r1
3.96-r1
upx
Alpine:v3.15
before 3.96-r1
3.96-r1
upx
Alpine:v3.16
before 3.96-r1
3.96-r1
upx
Alpine:v3.17
before 3.96-r1
3.96-r1
upx
Alpine:v3.18
before 3.96-r1
3.96-r1
upx
Alpine:v3.19
before 3.96-r1
3.96-r1
upx
Alpine:v3.20
before 3.96-r1
3.96-r1
upx
Alpine:v3.21
before 3.96-r1
3.96-r1
upx
Alpine:v3.22
before 3.96-r1
3.96-r1
Show 16 moreShow less
Affected packages
PackageAffectedFixed
upx
Alpine:v3.23
before 3.96-r1
3.96-r1
upx
Alpine:v3.24
before 3.96-r1
3.96-r1
upx-ucl
Debian:13
before 4.2.2-1
4.2.2-1
upx-ucl
Debian:14
before 4.2.2-1
4.2.2-1
upx
Mageia:7
From an advisory covering 2 CVEs
before 3.96-1.1.mga7
3.96-1.1.mga7
upx
Mageia:8
From an advisory covering 2 CVEs
before 3.96-2.1.mga8
3.96-2.1.mga8
upx-ucl
Ubuntu:16.04:LTS
All versions, plus listed versions
3.91-1
None known
upx-ucl
Ubuntu:18.04:LTS
All versions, plus listed versions
3.94-23.94-33.94-4
None known
upx-ucl
Ubuntu:20.04:LTS
All versions, plus listed versions
3.95-23.95-2build1
None known
upx-ucl
Ubuntu:22.04:LTS
All versions, plus listed versions
3.96-23.96-3
None known
upx-ucl
Ubuntu:24.04:LTS
All versions, plus listed versions
3.96-34.2.2-3
None known
upx-ucl
Ubuntu:25.10
All versions, plus listed versions
4.2.4-14.2.4-1.1
None known
upx-ucl
Ubuntu:26.10
All versions, plus listed versions
4.2.4-1.1build1
None known
upx-ucl
Ubuntu:26.04:LTS
All versions, plus listed versions
4.2.4-1.14.2.4-1.1build1
None known
upx
SUSE:Package Hub 15 SP4
From an advisory covering 12 CVEs
before 4.0.2-bp154.4.6.1
4.0.2-bp154.4.6.1
upx
openSUSE:Leap 15.4
From an advisory covering 12 CVEs
before 4.0.2-bp154.4.6.1
4.0.2-bp154.4.6.1

History

History
RecordedChangedSources
affected, facts
affected, aliases, referencesOSV
aliasesEUVD
first indexedCVE List, GitHub Advisories, NVD, OSV

Dates are when Every CVE recorded each change. Upstream dates may differ.

In short

CVE-2021-20285 is a medium vulnerability (CVSS 6.6) in Upx, published March 26, 2021. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.75%, the 55th percentile. Fixed in upx 3.96-r1.

References

Show 33 moreShow less
MoveEnter Open