docker-library / haproxy

Docker Official Image packaging for HAProxy
http://www.haproxy.org/
GNU General Public License v2.0
347 stars 158 forks source link

Vulnerable component detection issue #213

Closed huornlmj closed 7 months ago

huornlmj commented 1 year ago

Hi. While Docker's Scout vulnerability scanning engine only sees 24 low severity issues, when compared to Trivy in image scanning mode, it finds many many more:

haproxy:latest (debian 11.7)

Total: 76 (UNKNOWN: 0, LOW: 59, MEDIUM: 2, HIGH: 14, CRITICAL: 1)

I don't see any scanning in the workflows, so my proposition would be to begin using Trivy so that end users can avoid running containerized HAproxy with so many vulnerabilities.

Full report:

$ docker images | grep haproxy | grep latest
haproxy                                                       latest          95eb357b4726   21 hours ago    108MB
$ trivy image haproxy:latest
2023-06-01T17:28:06.948+0100    INFO    Vulnerability scanning is enabled
2023-06-01T17:28:06.948+0100    INFO    Secret scanning is enabled
2023-06-01T17:28:06.948+0100    INFO    If your scanning is slow, please try '--scanners vuln' to disable secret scanning
2023-06-01T17:28:06.948+0100    INFO    Please see also https://aquasecurity.github.io/trivy/v0.40/docs/secret/scanning/#recommendation for faster secret detection
2023-06-01T17:28:11.737+0100    INFO    Detected OS: debian
2023-06-01T17:28:11.737+0100    INFO    Detecting Debian vulnerabilities...
2023-06-01T17:28:11.751+0100    INFO    Number of language-specific files: 0

haproxy:latest (debian 11.7)

Total: 76 (UNKNOWN: 0, LOW: 59, MEDIUM: 2, HIGH: 14, CRITICAL: 1)

┌──────────────────┬──────────────────┬──────────┬────────────────────────┬───────────────┬──────────────────────────────────────────────────────────────┐
│     Library      │  Vulnerability   │ Severity │   Installed Version    │ Fixed Version │                            Title                             │
├──────────────────┼──────────────────┼──────────┼────────────────────────┼───────────────┼──────────────────────────────────────────────────────────────┤
│ apt              │ CVE-2011-3374    │ LOW      │ 2.2.4                  │               │ It was found that apt-key in apt, all versions, do not       │
│                  │                  │          │                        │               │ correctly...                                                 │
│                  │                  │          │                        │               │ https://avd.aquasec.com/nvd/cve-2011-3374                    │
├──────────────────┼──────────────────┼──────────┼────────────────────────┼───────────────┼──────────────────────────────────────────────────────────────┤
│ bash             │ CVE-2022-3715    │ HIGH     │ 5.1-2+deb11u1          │               │ a heap-buffer-overflow in valid_parameter_transform          │
│                  │                  │          │                        │               │ https://avd.aquasec.com/nvd/cve-2022-3715                    │
├──────────────────┼──────────────────┼──────────┼────────────────────────┼───────────────┼──────────────────────────────────────────────────────────────┤
│ bsdutils         │ CVE-2022-0563    │ LOW      │ 1:2.36.1-8+deb11u1     │               │ util-linux: partial disclosure of arbitrary files in chfn    │
│                  │                  │          │                        │               │ and chsh when compiled...                                    │
│                  │                  │          │                        │               │ https://avd.aquasec.com/nvd/cve-2022-0563                    │
├──────────────────┼──────────────────┤          ├────────────────────────┼───────────────┼──────────────────────────────────────────────────────────────┤
│ coreutils        │ CVE-2016-2781    │          │ 8.32-4+b1              │               │ coreutils: Non-privileged session can escape to the parent   │
│                  │                  │          │                        │               │ session in chroot                                            │
│                  │                  │          │                        │               │ https://avd.aquasec.com/nvd/cve-2016-2781                    │
│                  ├──────────────────┤          │                        ├───────────────┼──────────────────────────────────────────────────────────────┤
│                  │ CVE-2017-18018   │          │                        │               │ coreutils: race condition vulnerability in chown and chgrp   │
│                  │                  │          │                        │               │ https://avd.aquasec.com/nvd/cve-2017-18018                   │
├──────────────────┼──────────────────┼──────────┼────────────────────────┼───────────────┼──────────────────────────────────────────────────────────────┤
│ e2fsprogs        │ CVE-2022-1304    │ HIGH     │ 1.46.2-2               │               │ e2fsprogs: out-of-bounds read/write via crafted filesystem   │
│                  │                  │          │                        │               │ https://avd.aquasec.com/nvd/cve-2022-1304                    │
├──────────────────┼──────────────────┼──────────┼────────────────────────┼───────────────┼──────────────────────────────────────────────────────────────┤
│ gpgv             │ CVE-2022-3219    │ LOW      │ 2.2.27-2+deb11u2       │               │ denial of service issue (resource consumption) using         │
│                  │                  │          │                        │               │ compressed packets                                           │
│                  │                  │          │                        │               │ https://avd.aquasec.com/nvd/cve-2022-3219                    │
├──────────────────┼──────────────────┤          ├────────────────────────┼───────────────┼──────────────────────────────────────────────────────────────┤
│ libapt-pkg6.0    │ CVE-2011-3374    │          │ 2.2.4                  │               │ It was found that apt-key in apt, all versions, do not       │
│                  │                  │          │                        │               │ correctly...                                                 │
│                  │                  │          │                        │               │ https://avd.aquasec.com/nvd/cve-2011-3374                    │
├──────────────────┼──────────────────┤          ├────────────────────────┼───────────────┼──────────────────────────────────────────────────────────────┤
│ libblkid1        │ CVE-2022-0563    │          │ 2.36.1-8+deb11u1       │               │ util-linux: partial disclosure of arbitrary files in chfn    │
│                  │                  │          │                        │               │ and chsh when compiled...                                    │
│                  │                  │          │                        │               │ https://avd.aquasec.com/nvd/cve-2022-0563                    │
├──────────────────┼──────────────────┤          ├────────────────────────┼───────────────┼──────────────────────────────────────────────────────────────┤
│ libc-bin         │ CVE-2010-4756    │          │ 2.31-13+deb11u6        │               │ glibc: glob implementation can cause excessive CPU and       │
│                  │                  │          │                        │               │ memory consumption due to...                                 │
│                  │                  │          │                        │               │ https://avd.aquasec.com/nvd/cve-2010-4756                    │
│                  ├──────────────────┤          │                        ├───────────────┼──────────────────────────────────────────────────────────────┤
│                  │ CVE-2018-20796   │          │                        │               │ glibc: uncontrolled recursion in function                    │
│                  │                  │          │                        │               │ check_dst_limits_calc_pos_1 in posix/regexec.c               │
│                  │                  │          │                        │               │ https://avd.aquasec.com/nvd/cve-2018-20796                   │
│                  ├──────────────────┤          │                        ├───────────────┼──────────────────────────────────────────────────────────────┤
│                  │ CVE-2019-1010022 │          │                        │               │ glibc: stack guard protection bypass                         │
│                  │                  │          │                        │               │ https://avd.aquasec.com/nvd/cve-2019-1010022                 │
│                  ├──────────────────┤          │                        ├───────────────┼──────────────────────────────────────────────────────────────┤
│                  │ CVE-2019-1010023 │          │                        │               │ glibc: running ldd on malicious ELF leads to code execution  │
│                  │                  │          │                        │               │ because of...                                                │
│                  │                  │          │                        │               │ https://avd.aquasec.com/nvd/cve-2019-1010023                 │
│                  ├──────────────────┤          │                        ├───────────────┼──────────────────────────────────────────────────────────────┤
│                  │ CVE-2019-1010024 │          │                        │               │ glibc: ASLR bypass using cache of thread stack and heap      │
│                  │                  │          │                        │               │ https://avd.aquasec.com/nvd/cve-2019-1010024                 │
│                  ├──────────────────┤          │                        ├───────────────┼──────────────────────────────────────────────────────────────┤
│                  │ CVE-2019-1010025 │          │                        │               │ glibc: information disclosure of heap addresses of           │
│                  │                  │          │                        │               │ pthread_created thread                                       │
│                  │                  │          │                        │               │ https://avd.aquasec.com/nvd/cve-2019-1010025                 │
│                  ├──────────────────┤          │                        ├───────────────┼──────────────────────────────────────────────────────────────┤
│                  │ CVE-2019-9192    │          │                        │               │ glibc: uncontrolled recursion in function                    │
│                  │                  │          │                        │               │ check_dst_limits_calc_pos_1 in posix/regexec.c               │
│                  │                  │          │                        │               │ https://avd.aquasec.com/nvd/cve-2019-9192                    │
├──────────────────┼──────────────────┤          │                        ├───────────────┼──────────────────────────────────────────────────────────────┤
│ libc6            │ CVE-2010-4756    │          │                        │               │ glibc: glob implementation can cause excessive CPU and       │
│                  │                  │          │                        │               │ memory consumption due to...                                 │
│                  │                  │          │                        │               │ https://avd.aquasec.com/nvd/cve-2010-4756                    │
│                  ├──────────────────┤          │                        ├───────────────┼──────────────────────────────────────────────────────────────┤
│                  │ CVE-2018-20796   │          │                        │               │ glibc: uncontrolled recursion in function                    │
│                  │                  │          │                        │               │ check_dst_limits_calc_pos_1 in posix/regexec.c               │
│                  │                  │          │                        │               │ https://avd.aquasec.com/nvd/cve-2018-20796                   │
│                  ├──────────────────┤          │                        ├───────────────┼──────────────────────────────────────────────────────────────┤
│                  │ CVE-2019-1010022 │          │                        │               │ glibc: stack guard protection bypass                         │
│                  │                  │          │                        │               │ https://avd.aquasec.com/nvd/cve-2019-1010022                 │
│                  ├──────────────────┤          │                        ├───────────────┼──────────────────────────────────────────────────────────────┤
│                  │ CVE-2019-1010023 │          │                        │               │ glibc: running ldd on malicious ELF leads to code execution  │
│                  │                  │          │                        │               │ because of...                                                │
│                  │                  │          │                        │               │ https://avd.aquasec.com/nvd/cve-2019-1010023                 │
│                  ├──────────────────┤          │                        ├───────────────┼──────────────────────────────────────────────────────────────┤
│                  │ CVE-2019-1010024 │          │                        │               │ glibc: ASLR bypass using cache of thread stack and heap      │
│                  │                  │          │                        │               │ https://avd.aquasec.com/nvd/cve-2019-1010024                 │
│                  ├──────────────────┤          │                        ├───────────────┼──────────────────────────────────────────────────────────────┤
│                  │ CVE-2019-1010025 │          │                        │               │ glibc: information disclosure of heap addresses of           │
│                  │                  │          │                        │               │ pthread_created thread                                       │
│                  │                  │          │                        │               │ https://avd.aquasec.com/nvd/cve-2019-1010025                 │
│                  ├──────────────────┤          │                        ├───────────────┼──────────────────────────────────────────────────────────────┤
│                  │ CVE-2019-9192    │          │                        │               │ glibc: uncontrolled recursion in function                    │
│                  │                  │          │                        │               │ check_dst_limits_calc_pos_1 in posix/regexec.c               │
│                  │                  │          │                        │               │ https://avd.aquasec.com/nvd/cve-2019-9192                    │
├──────────────────┼──────────────────┼──────────┼────────────────────────┼───────────────┼──────────────────────────────────────────────────────────────┤
│ libcom-err2      │ CVE-2022-1304    │ HIGH     │ 1.46.2-2               │               │ e2fsprogs: out-of-bounds read/write via crafted filesystem   │
│                  │                  │          │                        │               │ https://avd.aquasec.com/nvd/cve-2022-1304                    │
├──────────────────┼──────────────────┼──────────┼────────────────────────┼───────────────┼──────────────────────────────────────────────────────────────┤
│ libdb5.3         │ CVE-2019-8457    │ CRITICAL │ 5.3.28+dfsg1-0.8       │               │ sqlite: heap out-of-bound read in function rtreenode()       │
│                  │                  │          │                        │               │ https://avd.aquasec.com/nvd/cve-2019-8457                    │
├──────────────────┼──────────────────┼──────────┼────────────────────────┼───────────────┼──────────────────────────────────────────────────────────────┤
│ libext2fs2       │ CVE-2022-1304    │ HIGH     │ 1.46.2-2               │               │ e2fsprogs: out-of-bounds read/write via crafted filesystem   │
│                  │                  │          │                        │               │ https://avd.aquasec.com/nvd/cve-2022-1304                    │
├──────────────────┼──────────────────┤          ├────────────────────────┼───────────────┼──────────────────────────────────────────────────────────────┤
│ libgcrypt20      │ CVE-2021-33560   │          │ 1.8.7-6                │               │ libgcrypt: mishandles ElGamal encryption because it lacks    │
│                  │                  │          │                        │               │ exponent blinding to address a...                            │
│                  │                  │          │                        │               │ https://avd.aquasec.com/nvd/cve-2021-33560                   │
│                  ├──────────────────┼──────────┤                        ├───────────────┼──────────────────────────────────────────────────────────────┤
│                  │ CVE-2018-6829    │ LOW      │                        │               │ libgcrypt: ElGamal implementation doesn't have semantic      │
│                  │                  │          │                        │               │ security due to incorrectly encoded plaintexts...            │
│                  │                  │          │                        │               │ https://avd.aquasec.com/nvd/cve-2018-6829                    │
├──────────────────┼──────────────────┤          ├────────────────────────┼───────────────┼──────────────────────────────────────────────────────────────┤
│ libgnutls30      │ CVE-2011-3389    │          │ 3.7.1-5+deb11u3        │               │ HTTPS: block-wise chosen-plaintext attack against SSL/TLS    │
│                  │                  │          │                        │               │ (BEAST)                                                      │
│                  │                  │          │                        │               │ https://avd.aquasec.com/nvd/cve-2011-3389                    │
├──────────────────┼──────────────────┤          ├────────────────────────┼───────────────┼──────────────────────────────────────────────────────────────┤
│ libgssapi-krb5-2 │ CVE-2018-5709    │          │ 1.18.3-6+deb11u3       │               │ krb5: integer overflow in dbentry->n_key_data in             │
│                  │                  │          │                        │               │ kadmin/dbutil/dump.c                                         │
│                  │                  │          │                        │               │ https://avd.aquasec.com/nvd/cve-2018-5709                    │
├──────────────────┤                  │          │                        ├───────────────┤                                                              │
│ libk5crypto3     │                  │          │                        │               │                                                              │
│                  │                  │          │                        │               │                                                              │
│                  │                  │          │                        │               │                                                              │
├──────────────────┤                  │          │                        ├───────────────┤                                                              │
│ libkrb5-3        │                  │          │                        │               │                                                              │
│                  │                  │          │                        │               │                                                              │
│                  │                  │          │                        │               │                                                              │
├──────────────────┤                  │          │                        ├───────────────┤                                                              │
│ libkrb5support0  │                  │          │                        │               │                                                              │
│                  │                  │          │                        │               │                                                              │
│                  │                  │          │                        │               │                                                              │
├──────────────────┼──────────────────┼──────────┼────────────────────────┼───────────────┼──────────────────────────────────────────────────────────────┤
│ liblua5.3-0      │ CVE-2019-6706    │ HIGH     │ 5.3.3-1.1+b1           │               │ lua: use-after-free in lua_upvaluejoin in lapi.c resulting   │
│                  │                  │          │                        │               │ in denial of service                                         │
│                  │                  │          │                        │               │ https://avd.aquasec.com/nvd/cve-2019-6706                    │
│                  ├──────────────────┼──────────┤                        ├───────────────┼──────────────────────────────────────────────────────────────┤
│                  │ CVE-2020-24370   │ MEDIUM   │                        │               │ lua: segmentation fault in getlocal and setlocal functions   │
│                  │                  │          │                        │               │ in ldebug.c                                                  │
│                  │                  │          │                        │               │ https://avd.aquasec.com/nvd/cve-2020-24370                   │
│                  ├──────────────────┤          │                        ├───────────────┼──────────────────────────────────────────────────────────────┤
│                  │ CVE-2021-43519   │          │                        │               │ lua: stack overflow in lua_resume of ldo.c allows a DoS via  │
│                  │                  │          │                        │               │ a...                                                         │
│                  │                  │          │                        │               │ https://avd.aquasec.com/nvd/cve-2021-43519                   │
├──────────────────┼──────────────────┼──────────┼────────────────────────┼───────────────┼──────────────────────────────────────────────────────────────┤
│ libmount1        │ CVE-2022-0563    │ LOW      │ 2.36.1-8+deb11u1       │               │ util-linux: partial disclosure of arbitrary files in chfn    │
│                  │                  │          │                        │               │ and chsh when compiled...                                    │
│                  │                  │          │                        │               │ https://avd.aquasec.com/nvd/cve-2022-0563                    │
├──────────────────┼──────────────────┤          ├────────────────────────┼───────────────┼──────────────────────────────────────────────────────────────┤
│ libpcre3         │ CVE-2017-11164   │          │ 2:8.39-13              │               │ pcre: OP_KETRMAX feature in the match function in            │
│                  │                  │          │                        │               │ pcre_exec.c                                                  │
│                  │                  │          │                        │               │ https://avd.aquasec.com/nvd/cve-2017-11164                   │
│                  ├──────────────────┤          │                        ├───────────────┼──────────────────────────────────────────────────────────────┤
│                  │ CVE-2017-16231   │          │                        │               │ pcre: self-recursive call in match() in pcre_exec.c leads to │
│                  │                  │          │                        │               │ denial of service...                                         │
│                  │                  │          │                        │               │ https://avd.aquasec.com/nvd/cve-2017-16231                   │
│                  ├──────────────────┤          │                        ├───────────────┼──────────────────────────────────────────────────────────────┤
│                  │ CVE-2017-7245    │          │                        │               │ pcre: stack-based buffer overflow write in                   │
│                  │                  │          │                        │               │ pcre32_copy_substring                                        │
│                  │                  │          │                        │               │ https://avd.aquasec.com/nvd/cve-2017-7245                    │
│                  ├──────────────────┤          │                        ├───────────────┼──────────────────────────────────────────────────────────────┤
│                  │ CVE-2017-7246    │          │                        │               │ pcre: stack-based buffer overflow write in                   │
│                  │                  │          │                        │               │ pcre32_copy_substring                                        │
│                  │                  │          │                        │               │ https://avd.aquasec.com/nvd/cve-2017-7246                    │
│                  ├──────────────────┤          │                        ├───────────────┼──────────────────────────────────────────────────────────────┤
│                  │ CVE-2019-20838   │          │                        │               │ pcre: Buffer over-read in JIT when UTF is disabled and \X    │
│                  │                  │          │                        │               │ or...                                                        │
│                  │                  │          │                        │               │ https://avd.aquasec.com/nvd/cve-2019-20838                   │
├──────────────────┼──────────────────┤          ├────────────────────────┼───────────────┼──────────────────────────────────────────────────────────────┤
│ libsepol1        │ CVE-2021-36084   │          │ 3.1-1                  │               │ libsepol: use-after-free in __cil_verify_classperms()        │
│                  │                  │          │                        │               │ https://avd.aquasec.com/nvd/cve-2021-36084                   │
│                  ├──────────────────┤          │                        ├───────────────┼──────────────────────────────────────────────────────────────┤
│                  │ CVE-2021-36085   │          │                        │               │ libsepol: use-after-free in __cil_verify_classperms()        │
│                  │                  │          │                        │               │ https://avd.aquasec.com/nvd/cve-2021-36085                   │
│                  ├──────────────────┤          │                        ├───────────────┼──────────────────────────────────────────────────────────────┤
│                  │ CVE-2021-36086   │          │                        │               │ use-after-free in cil_reset_classpermission()                │
│                  │                  │          │                        │               │ https://avd.aquasec.com/nvd/cve-2021-36086                   │
│                  ├──────────────────┤          │                        ├───────────────┼──────────────────────────────────────────────────────────────┤
│                  │ CVE-2021-36087   │          │                        │               │ libsepol: heap-based buffer overflow in ebitmap_match_any()  │
│                  │                  │          │                        │               │ https://avd.aquasec.com/nvd/cve-2021-36087                   │
├──────────────────┼──────────────────┤          ├────────────────────────┼───────────────┼──────────────────────────────────────────────────────────────┤
│ libsmartcols1    │ CVE-2022-0563    │          │ 2.36.1-8+deb11u1       │               │ util-linux: partial disclosure of arbitrary files in chfn    │
│                  │                  │          │                        │               │ and chsh when compiled...                                    │
│                  │                  │          │                        │               │ https://avd.aquasec.com/nvd/cve-2022-0563                    │
├──────────────────┼──────────────────┼──────────┼────────────────────────┼───────────────┼──────────────────────────────────────────────────────────────┤
│ libss2           │ CVE-2022-1304    │ HIGH     │ 1.46.2-2               │               │ e2fsprogs: out-of-bounds read/write via crafted filesystem   │
│                  │                  │          │                        │               │ https://avd.aquasec.com/nvd/cve-2022-1304                    │
├──────────────────┼──────────────────┼──────────┼────────────────────────┼───────────────┼──────────────────────────────────────────────────────────────┤
│ libssl1.1        │ CVE-2007-6755    │ LOW      │ 1.1.1n-0+deb11u5       │               │ Dual_EC_DRBG: weak pseudo random number generator            │
│                  │                  │          │                        │               │ https://avd.aquasec.com/nvd/cve-2007-6755                    │
│                  ├──────────────────┤          │                        ├───────────────┼──────────────────────────────────────────────────────────────┤
│                  │ CVE-2010-0928    │          │                        │               │ openssl: RSA authentication weakness                         │
│                  │                  │          │                        │               │ https://avd.aquasec.com/nvd/cve-2010-0928                    │
├──────────────────┼──────────────────┤          ├────────────────────────┼───────────────┼──────────────────────────────────────────────────────────────┤
│ libsystemd0      │ CVE-2013-4392    │          │ 247.3-7+deb11u2        │               │ TOCTOU race condition when updating file permissions and     │
│                  │                  │          │                        │               │ SELinux security contexts                                    │
│                  │                  │          │                        │               │ https://avd.aquasec.com/nvd/cve-2013-4392                    │
│                  ├──────────────────┤          │                        ├───────────────┼──────────────────────────────────────────────────────────────┤
│                  │ CVE-2020-13529   │          │                        │               │ systemd: DHCP FORCERENEW authentication not implemented can  │
│                  │                  │          │                        │               │ cause a system running the...                                │
│                  │                  │          │                        │               │ https://avd.aquasec.com/nvd/cve-2020-13529                   │
├──────────────────┼──────────────────┼──────────┼────────────────────────┼───────────────┼──────────────────────────────────────────────────────────────┤
│ libtinfo6        │ CVE-2023-29491   │ HIGH     │ 6.2+20201114-2+deb11u1 │               │ Local users can trigger security-relevant memory corruption  │
│                  │                  │          │                        │               │ via malformed data                                           │
│                  │                  │          │                        │               │ https://avd.aquasec.com/nvd/cve-2023-29491                   │
├──────────────────┼──────────────────┼──────────┼────────────────────────┼───────────────┼──────────────────────────────────────────────────────────────┤
│ libudev1         │ CVE-2013-4392    │ LOW      │ 247.3-7+deb11u2        │               │ TOCTOU race condition when updating file permissions and     │
│                  │                  │          │                        │               │ SELinux security contexts                                    │
│                  │                  │          │                        │               │ https://avd.aquasec.com/nvd/cve-2013-4392                    │
│                  ├──────────────────┤          │                        ├───────────────┼──────────────────────────────────────────────────────────────┤
│                  │ CVE-2020-13529   │          │                        │               │ systemd: DHCP FORCERENEW authentication not implemented can  │
│                  │                  │          │                        │               │ cause a system running the...                                │
│                  │                  │          │                        │               │ https://avd.aquasec.com/nvd/cve-2020-13529                   │
├──────────────────┼──────────────────┤          ├────────────────────────┼───────────────┼──────────────────────────────────────────────────────────────┤
│ libuuid1         │ CVE-2022-0563    │          │ 2.36.1-8+deb11u1       │               │ util-linux: partial disclosure of arbitrary files in chfn    │
│                  │                  │          │                        │               │ and chsh when compiled...                                    │
│                  │                  │          │                        │               │ https://avd.aquasec.com/nvd/cve-2022-0563                    │
├──────────────────┼──────────────────┼──────────┼────────────────────────┼───────────────┼──────────────────────────────────────────────────────────────┤
│ libzstd1         │ CVE-2022-4899    │ HIGH     │ 1.4.8+dfsg-2.1         │               │ buffer overrun in util.c                                     │
│                  │                  │          │                        │               │ https://avd.aquasec.com/nvd/cve-2022-4899                    │
├──────────────────┼──────────────────┼──────────┼────────────────────────┼───────────────┼──────────────────────────────────────────────────────────────┤
│ login            │ CVE-2007-5686    │ LOW      │ 1:4.8.1-1              │               │ initscripts in rPath Linux 1 sets insecure permissions for   │
│                  │                  │          │                        │               │ the /var/lo ......                                           │
│                  │                  │          │                        │               │ https://avd.aquasec.com/nvd/cve-2007-5686                    │
│                  ├──────────────────┤          │                        ├───────────────┼──────────────────────────────────────────────────────────────┤
│                  │ CVE-2013-4235    │          │                        │               │ shadow-utils: TOCTOU race conditions by copying and removing │
│                  │                  │          │                        │               │ directory trees                                              │
│                  │                  │          │                        │               │ https://avd.aquasec.com/nvd/cve-2013-4235                    │
│                  ├──────────────────┤          │                        ├───────────────┼──────────────────────────────────────────────────────────────┤
│                  │ CVE-2019-19882   │          │                        │               │ shadow-utils: local users can obtain root access because     │
│                  │                  │          │                        │               │ setuid programs are misconfigured...                         │
│                  │                  │          │                        │               │ https://avd.aquasec.com/nvd/cve-2019-19882                   │
│                  ├──────────────────┤          │                        ├───────────────┼──────────────────────────────────────────────────────────────┤
│                  │ CVE-2023-29383   │          │                        │               │ Improper input validation in shadow-utils package utility    │
│                  │                  │          │                        │               │ chfn                                                         │
│                  │                  │          │                        │               │ https://avd.aquasec.com/nvd/cve-2023-29383                   │
├──────────────────┼──────────────────┼──────────┼────────────────────────┼───────────────┼──────────────────────────────────────────────────────────────┤
│ logsave          │ CVE-2022-1304    │ HIGH     │ 1.46.2-2               │               │ e2fsprogs: out-of-bounds read/write via crafted filesystem   │
│                  │                  │          │                        │               │ https://avd.aquasec.com/nvd/cve-2022-1304                    │
├──────────────────┼──────────────────┼──────────┼────────────────────────┼───────────────┼──────────────────────────────────────────────────────────────┤
│ mount            │ CVE-2022-0563    │ LOW      │ 2.36.1-8+deb11u1       │               │ util-linux: partial disclosure of arbitrary files in chfn    │
│                  │                  │          │                        │               │ and chsh when compiled...                                    │
│                  │                  │          │                        │               │ https://avd.aquasec.com/nvd/cve-2022-0563                    │
├──────────────────┼──────────────────┼──────────┼────────────────────────┼───────────────┼──────────────────────────────────────────────────────────────┤
│ ncurses-base     │ CVE-2023-29491   │ HIGH     │ 6.2+20201114-2+deb11u1 │               │ Local users can trigger security-relevant memory corruption  │
│                  │                  │          │                        │               │ via malformed data                                           │
│                  │                  │          │                        │               │ https://avd.aquasec.com/nvd/cve-2023-29491                   │
├──────────────────┤                  │          │                        ├───────────────┤                                                              │
│ ncurses-bin      │                  │          │                        │               │                                                              │
│                  │                  │          │                        │               │                                                              │
│                  │                  │          │                        │               │                                                              │
├──────────────────┼──────────────────┼──────────┼────────────────────────┼───────────────┼──────────────────────────────────────────────────────────────┤
│ passwd           │ CVE-2007-5686    │ LOW      │ 1:4.8.1-1              │               │ initscripts in rPath Linux 1 sets insecure permissions for   │
│                  │                  │          │                        │               │ the /var/lo ......                                           │
│                  │                  │          │                        │               │ https://avd.aquasec.com/nvd/cve-2007-5686                    │
│                  ├──────────────────┤          │                        ├───────────────┼──────────────────────────────────────────────────────────────┤
│                  │ CVE-2013-4235    │          │                        │               │ shadow-utils: TOCTOU race conditions by copying and removing │
│                  │                  │          │                        │               │ directory trees                                              │
│                  │                  │          │                        │               │ https://avd.aquasec.com/nvd/cve-2013-4235                    │
│                  ├──────────────────┤          │                        ├───────────────┼──────────────────────────────────────────────────────────────┤
│                  │ CVE-2019-19882   │          │                        │               │ shadow-utils: local users can obtain root access because     │
│                  │                  │          │                        │               │ setuid programs are misconfigured...                         │
│                  │                  │          │                        │               │ https://avd.aquasec.com/nvd/cve-2019-19882                   │
│                  ├──────────────────┤          │                        ├───────────────┼──────────────────────────────────────────────────────────────┤
│                  │ CVE-2023-29383   │          │                        │               │ Improper input validation in shadow-utils package utility    │
│                  │                  │          │                        │               │ chfn                                                         │
│                  │                  │          │                        │               │ https://avd.aquasec.com/nvd/cve-2023-29383                   │
├──────────────────┼──────────────────┼──────────┼────────────────────────┼───────────────┼──────────────────────────────────────────────────────────────┤
│ perl-base        │ CVE-2020-16156   │ HIGH     │ 5.32.1-4+deb11u2       │               │ perl-CPAN: Bypass of verification of signatures in CHECKSUMS │
│                  │                  │          │                        │               │ files                                                        │
│                  │                  │          │                        │               │ https://avd.aquasec.com/nvd/cve-2020-16156                   │
│                  ├──────────────────┤          │                        ├───────────────┼──────────────────────────────────────────────────────────────┤
│                  │ CVE-2023-31484   │          │                        │               │ CPAN.pm before 2.35 does not verify TLS certificates when    │
│                  │                  │          │                        │               │ downloading ......                                           │
│                  │                  │          │                        │               │ https://avd.aquasec.com/nvd/cve-2023-31484                   │
│                  ├──────────────────┼──────────┤                        ├───────────────┼──────────────────────────────────────────────────────────────┤
│                  │ CVE-2011-4116    │ LOW      │                        │               │ perl: File::Temp insecure temporary file handling            │
│                  │                  │          │                        │               │ https://avd.aquasec.com/nvd/cve-2011-4116                    │
│                  ├──────────────────┤          │                        ├───────────────┼──────────────────────────────────────────────────────────────┤
│                  │ CVE-2023-31486   │          │                        │               │ HTTP::Tiny 0.082, a Perl core module since 5.13.9 and        │
│                  │                  │          │                        │               │ available standa ......                                      │
│                  │                  │          │                        │               │ https://avd.aquasec.com/nvd/cve-2023-31486                   │
├──────────────────┼──────────────────┤          ├────────────────────────┼───────────────┼──────────────────────────────────────────────────────────────┤
│ tar              │ CVE-2005-2541    │          │ 1.34+dfsg-1            │               │ tar: does not properly warn the user when extracting setuid  │
│                  │                  │          │                        │               │ or setgid...                                                 │
│                  │                  │          │                        │               │ https://avd.aquasec.com/nvd/cve-2005-2541                    │
│                  ├──────────────────┤          │                        ├───────────────┼──────────────────────────────────────────────────────────────┤
│                  │ CVE-2022-48303   │          │                        │               │ heap buffer overflow at from_header() in list.c via          │
│                  │                  │          │                        │               │ specially crafted checksum                                   │
│                  │                  │          │                        │               │ https://avd.aquasec.com/nvd/cve-2022-48303                   │
├──────────────────┼──────────────────┤          ├────────────────────────┼───────────────┼──────────────────────────────────────────────────────────────┤
│ util-linux       │ CVE-2022-0563    │          │ 2.36.1-8+deb11u1       │               │ util-linux: partial disclosure of arbitrary files in chfn    │
│                  │                  │          │                        │               │ and chsh when compiled...                                    │
│                  │                  │          │                        │               │ https://avd.aquasec.com/nvd/cve-2022-0563                    │
└──────────────────┴──────────────────┴──────────┴────────────────────────┴───────────────┴──────────────────────────────────────────────────────────────┘
yosifkit commented 1 year ago

These are all in Debian Packages with no fixes available so there is nothing for us to update. I trust the Debian Security Team to have provided a fix when the CVE is actually important.

Unfixed packages would often be true in many other distributions (like Ubuntu), but they are more aggressive at marking CVE tracking issues as "won't fix", whereas Debian usually just puts "no-dsa" (which I interpret as, "any Debian Developer could fix this if they want to, but the Debian Security Team considers it low security impact and so won't spend extra time to backport a fix").

Vulnerability tools incorporate the "won't fix" info, so it can look like an Ubuntu based image is "more secure" (it could even be using the exact same underlying package version from Debian). I believe Docker Scout is incorporating some of the Debian "no-dsa" reports into their vulnerability analysis, which is probably why it is lower.

$ docker run -it --rm --user root haproxy bash
Unable to find image 'haproxy:latest' locally
latest: Pulling from library/haproxy
f03b40093957: Pull complete
a3d37cc643bc: Pull complete
70ec3cce8b15: Pull complete
4df0e13bf58b: Pull complete
Digest: sha256:b789b97827c87ba222f6e24073c3796773dd32b8c3cace5c673f10cddeadd1ab
Status: Downloaded newer image for haproxy:latest
root@90e83562b000:/var/lib/haproxy# apt update
Get:1 http://deb.debian.org/debian bullseye InRelease [116 kB]
Get:2 http://deb.debian.org/debian-security bullseye-security InRelease [48.4 kB]
Get:3 http://deb.debian.org/debian bullseye-updates InRelease [44.1 kB]
Get:4 http://deb.debian.org/debian bullseye/main amd64 Packages [8183 kB]
Get:5 http://deb.debian.org/debian-security bullseye-security/main amd64 Packages [245 kB]
Get:6 http://deb.debian.org/debian bullseye-updates/main amd64 Packages [14.8 kB]
Fetched 8651 kB in 1s (8187 kB/s)
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
All packages are up to date.
root@90e83562b000:/var/lib/haproxy#

Official Images FAQ:

Though not every CVE is removed from the images, we take CVEs seriously and try to ensure that images contain the most up-to-date packages available within a reasonable time frame

- https://github.com/docker-library/faq/tree/0ad5fd60288109c875a54a37f6581b2deaa836db#why-does-my-security-scanner-show-that-an-image-has-cves

TimWolla commented 1 year ago

Also stuff like “e2fsprogs” is effectively never used from within a container. If the code isn't executed the vulnerability is much much less relevant. HAProxy tries to make it hard to exploit code execution vulnerabilities, e.g. by setting an ulimit that prevents spawning additional processes:

https://docs.haproxy.org/dev/configuration.html#insecure-fork-wanted

cdupuis commented 1 year ago

thanks @huornlmj for raising this.

As @yosifkit mentioned, Docker Scout incorporates vendor/distribution specific advisory data (in this case reports by the Debian security team). Take a look at CVE-2019-8457: The Debian security team assigned no-dsa to this at https://nvd.nist.gov/vuln/detail/CVE-2019-8457 which effectively means that this isn't a security concern on Debian. That's why that CVE doesn't show up in our reports; Trivy on the other hand seems to prefer the NIST data and assign a critical severity to this CVE.

We understand that this has the potential for misinterpretation and we are working on surfacing this information more clearly to users.