CVE-2021-40153

Source
https://nvd.nist.gov/vuln/detail/CVE-2021-40153
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2021-40153.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2021-40153
Related
Published
2021-08-27T15:15:09Z
Modified
2024-12-05T15:34:20.216013Z
Severity
  • 8.1 (High) CVSS_V3 - CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:H CVSS Calculator
Summary
[none]
Details

squashfs_opendir in unsquash-1.c in Squashfs-Tools 4.5 stores the filename in the directory entry; this is then used by unsquashfs to create the new file during the unsquash. The filename is not validated for traversal outside of the destination directory, and thus allows writing to locations outside of the destination.

References

Affected packages

Alpine:v3.11 / squashfs-tools

Package

Name
squashfs-tools
Purl
pkg:apk/alpine/squashfs-tools?arch=source

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
4.5-r0

Affected versions

4.*

4.0-r0
4.0-r1
4.1-r0
4.2-r0
4.2-r1
4.2-r2
4.3-r0
4.3-r1
4.3-r2
4.3-r3
4.3-r4
4.3-r5
4.3-r6
4.4-r0

Alpine:v3.12 / squashfs-tools

Package

Name
squashfs-tools
Purl
pkg:apk/alpine/squashfs-tools?arch=source

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
4.5-r0

Affected versions

4.*

4.0-r0
4.0-r1
4.1-r0
4.2-r0
4.2-r1
4.2-r2
4.3-r0
4.3-r1
4.3-r2
4.3-r3
4.3-r4
4.3-r5
4.3-r6
4.4-r0

Alpine:v3.13 / squashfs-tools

Package

Name
squashfs-tools
Purl
pkg:apk/alpine/squashfs-tools?arch=source

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
4.5-r0

Affected versions

4.*

4.0-r0
4.0-r1
4.1-r0
4.2-r0
4.2-r1
4.2-r2
4.3-r0
4.3-r1
4.3-r2
4.3-r3
4.3-r4
4.3-r5
4.3-r6
4.4-r0
4.4-r1

Alpine:v3.14 / squashfs-tools

Package

Name
squashfs-tools
Purl
pkg:apk/alpine/squashfs-tools?arch=source

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
4.5-r0

Affected versions

4.*

4.0-r0
4.0-r1
4.1-r0
4.2-r0
4.2-r1
4.2-r2
4.3-r0
4.3-r1
4.3-r2
4.3-r3
4.3-r4
4.3-r5
4.3-r6
4.4-r0
4.4-r1

Alpine:v3.15 / squashfs-tools

Package

Name
squashfs-tools
Purl
pkg:apk/alpine/squashfs-tools?arch=source

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
4.5-r0

Affected versions

4.*

4.0-r0
4.0-r1
4.1-r0
4.2-r0
4.2-r1
4.2-r2
4.3-r0
4.3-r1
4.3-r2
4.3-r3
4.3-r4
4.3-r5
4.3-r6
4.4-r0
4.4-r1

Alpine:v3.16 / squashfs-tools

Package

Name
squashfs-tools
Purl
pkg:apk/alpine/squashfs-tools?arch=source

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
4.5-r0

Affected versions

4.*

4.0-r0
4.0-r1
4.1-r0
4.2-r0
4.2-r1
4.2-r2
4.3-r0
4.3-r1
4.3-r2
4.3-r3
4.3-r4
4.3-r5
4.3-r6
4.4-r0
4.4-r1

Alpine:v3.17 / squashfs-tools

Package

Name
squashfs-tools
Purl
pkg:apk/alpine/squashfs-tools?arch=source

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
4.5-r0

Affected versions

4.*

4.0-r0
4.0-r1
4.1-r0
4.2-r0
4.2-r1
4.2-r2
4.3-r0
4.3-r1
4.3-r2
4.3-r3
4.3-r4
4.3-r5
4.3-r6
4.4-r0
4.4-r1

Alpine:v3.18 / squashfs-tools

Package

Name
squashfs-tools
Purl
pkg:apk/alpine/squashfs-tools?arch=source

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
4.5-r0

Affected versions

4.*

4.0-r0
4.0-r1
4.1-r0
4.2-r0
4.2-r1
4.2-r2
4.3-r0
4.3-r1
4.3-r2
4.3-r3
4.3-r4
4.3-r5
4.3-r6
4.4-r0
4.4-r1

Alpine:v3.19 / squashfs-tools

Package

Name
squashfs-tools
Purl
pkg:apk/alpine/squashfs-tools?arch=source

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
4.5-r0

Affected versions

4.*

4.0-r0
4.0-r1
4.1-r0
4.2-r0
4.2-r1
4.2-r2
4.3-r0
4.3-r1
4.3-r2
4.3-r3
4.3-r4
4.3-r5
4.3-r6
4.4-r0
4.4-r1

Alpine:v3.20 / squashfs-tools

Package

Name
squashfs-tools
Purl
pkg:apk/alpine/squashfs-tools?arch=source

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
4.5-r0

Affected versions

4.*

4.0-r0
4.0-r1
4.1-r0
4.2-r0
4.2-r1
4.2-r2
4.3-r0
4.3-r1
4.3-r2
4.3-r3
4.3-r4
4.3-r5
4.3-r6
4.4-r0
4.4-r1

Alpine:v3.21 / squashfs-tools

Package

Name
squashfs-tools
Purl
pkg:apk/alpine/squashfs-tools?arch=source

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
4.5-r0

Affected versions

4.*

4.0-r0
4.0-r1
4.1-r0
4.2-r0
4.2-r1
4.2-r2
4.3-r0
4.3-r1
4.3-r2
4.3-r3
4.3-r4
4.3-r5
4.3-r6
4.4-r0
4.4-r1

Debian:11 / squashfs-tools

Package

Name
squashfs-tools
Purl
pkg:deb/debian/squashfs-tools?arch=source

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
1:4.4-2+deb11u1

Affected versions

1:4.*

1:4.4-2

Ecosystem specific

{
    "urgency": "not yet assigned"
}

Debian:12 / squashfs-tools

Package

Name
squashfs-tools
Purl
pkg:deb/debian/squashfs-tools?arch=source

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
1:4.5-2

Ecosystem specific

{
    "urgency": "not yet assigned"
}

Debian:13 / squashfs-tools

Package

Name
squashfs-tools
Purl
pkg:deb/debian/squashfs-tools?arch=source

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
1:4.5-2

Ecosystem specific

{
    "urgency": "not yet assigned"
}

Git / github.com/plougher/squashfs-tools

Affected ranges

Type
GIT
Repo
https://github.com/plougher/squashfs-tools
Events
Introduced
0 Unknown introduced commit / All previous commits are affected
Fixed

Affected versions

3.*

3.1
3.2
3.2-r2

4.*

4.4
4.4-git.1