structurizr / cli

A command line utility for Structurizr.
https://docs.structurizr.com/cli
Apache License 2.0
492 stars 75 forks source link

Critical vulnerability in docker image #91

Closed dgutson closed 1 year ago

dgutson commented 1 year ago

The structurizr-cli docker image contains a critical vulnerability in the following package: ubuntu/expat 2.4.7-1: https://dso.docker.com/cve/CVE-2022-40674 (CVSS 9.8)

simonbrowndotje commented 1 year ago

Feel free to submit a PR to the Dockerfile ... thanks!

dgutson commented 1 year ago

@franco0700 pls address this. @simonbrowndotje pls assign this to him.

dgutson commented 1 year ago

@simonbrowndotje , @franco0700 is working on this, and he will contribute dependabot too if you want. Let's bargain :) https://github.com/structurizr/dsl/issues/185 ?

simonbrowndotje commented 1 year ago

Which tool are you using to check the Docker image?

dgutson commented 1 year ago

He used trivy. I used docker desktop. There's a difference in the categorization of that particular CVE, but trivy should be good enough.

simonbrowndotje commented 1 year ago

It shows as a MEDIUM in trivy:

structurizr/cli:2876 (ubuntu 22.04)
===================================
Total: 57 (UNKNOWN: 0, LOW: 41, MEDIUM: 16, HIGH: 0, CRITICAL: 0)

┌───────────────────────────┬──────────────────┬──────────┬──────────────────────────┬─────────────────────────┬──────────────────────────────────────────────────────────────┐
│          Library          │  Vulnerability   │ Severity │    Installed Version     │      Fixed Version      │                            Title                             │
...
│ libexpat1                 │ CVE-2022-40674   │          │ 2.4.7-1                  │ 2.4.7-1ubuntu0.1        │ expat: a use-after-free in the doContent function in         │
│                           │                  │          │                          │                         │ xmlparse.c                                                   │
│                           │                  │          │                          │                         │ https://avd.aquasec.com/nvd/cve-2022-40674                   │
│                           ├──────────────────┤          │                          ├─────────────────────────┼──────────────────────────────────────────────────────────────┤
│                           │ CVE-2022-43680   │          │                          │ 2.4.7-1ubuntu0.2        │ expat: use-after free caused by overeager destruction of a   │
│                           │                  │          │                          │                         │ shared DTD in...                                             │
│                           │                  │          │                          │                         │ https://avd.aquasec.com/nvd/cve-2022-43680                   │

And doesn't show using the eclipse-temurin:17.0.5_8-jre-jammy base image, so I think we can close this issue now.

structurizr/cli:latest (ubuntu 22.04)
=====================================
Total: 46 (UNKNOWN: 0, LOW: 39, MEDIUM: 7, HIGH: 0, CRITICAL: 0)

┌───────────────────────────┬──────────────────┬──────────┬──────────────────────────┬───────────────┬──────────────────────────────────────────────────────────────┐
│          Library          │  Vulnerability   │ Severity │    Installed Version     │ Fixed Version │                            Title                             │
├───────────────────────────┼──────────────────┼──────────┼──────────────────────────┼───────────────┼──────────────────────────────────────────────────────────────┤
│ bash                      │ CVE-2022-3715    │ LOW      │ 5.1-6ubuntu1             │               │ bash: a heap-buffer-overflow in valid_parameter_transform    │
│                           │                  │          │                          │               │ https://avd.aquasec.com/nvd/cve-2022-3715                    │
├───────────────────────────┼──────────────────┤          ├──────────────────────────┼───────────────┼──────────────────────────────────────────────────────────────┤
│ binutils                  │ CVE-2017-13716   │          │ 2.38-4ubuntu2.1          │               │ binutils: Memory leak with the C++ symbol demangler routine  │
│                           │                  │          │                          │               │ in libiberty                                                 │
│                           │                  │          │                          │               │ https://avd.aquasec.com/nvd/cve-2017-13716                   │
│                           ├──────────────────┤          │                          ├───────────────┼──────────────────────────────────────────────────────────────┤
│                           │ CVE-2018-20657   │          │                          │               │ libiberty: Memory leak in demangle_template function         │
│                           │                  │          │                          │               │ resulting in a denial of service...                          │
│                           │                  │          │                          │               │ https://avd.aquasec.com/nvd/cve-2018-20657                   │
│                           ├──────────────────┤          │                          ├───────────────┼──────────────────────────────────────────────────────────────┤
│                           │ CVE-2019-1010204 │          │                          │               │ binutils: Improper Input Validation, Signed/Unsigned         │
│                           │                  │          │                          │               │ Comparison, Out-of-bounds Read in gold/fileread.cc and       │
│                           │                  │          │                          │               │ elfcpp/elfcpp_file.h...                                      │
│                           │                  │          │                          │               │ https://avd.aquasec.com/nvd/cve-2019-1010204                 │
│                           ├──────────────────┤          │                          ├───────────────┼──────────────────────────────────────────────────────────────┤
│                           │ CVE-2021-3530    │          │                          │               │ binutils: stack memory exhaustion in demangle_path() in      │
│                           │                  │          │                          │               │ rust-demangle.c                                              │
│                           │                  │          │                          │               │ https://avd.aquasec.com/nvd/cve-2021-3530                    │
├───────────────────────────┼──────────────────┤          │                          ├───────────────┼──────────────────────────────────────────────────────────────┤
│ binutils-common           │ CVE-2017-13716   │          │                          │               │ binutils: Memory leak with the C++ symbol demangler routine  │
│                           │                  │          │                          │               │ in libiberty                                                 │
│                           │                  │          │                          │               │ https://avd.aquasec.com/nvd/cve-2017-13716                   │
│                           ├──────────────────┤          │                          ├───────────────┼──────────────────────────────────────────────────────────────┤
│                           │ CVE-2018-20657   │          │                          │               │ libiberty: Memory leak in demangle_template function         │
│                           │                  │          │                          │               │ resulting in a denial of service...                          │
│                           │                  │          │                          │               │ https://avd.aquasec.com/nvd/cve-2018-20657                   │
│                           ├──────────────────┤          │                          ├───────────────┼──────────────────────────────────────────────────────────────┤
│                           │ CVE-2019-1010204 │          │                          │               │ binutils: Improper Input Validation, Signed/Unsigned         │
│                           │                  │          │                          │               │ Comparison, Out-of-bounds Read in gold/fileread.cc and       │
│                           │                  │          │                          │               │ elfcpp/elfcpp_file.h...                                      │
│                           │                  │          │                          │               │ https://avd.aquasec.com/nvd/cve-2019-1010204                 │
│                           ├──────────────────┤          │                          ├───────────────┼──────────────────────────────────────────────────────────────┤
│                           │ CVE-2021-3530    │          │                          │               │ binutils: stack memory exhaustion in demangle_path() in      │
│                           │                  │          │                          │               │ rust-demangle.c                                              │
│                           │                  │          │                          │               │ https://avd.aquasec.com/nvd/cve-2021-3530                    │
├───────────────────────────┼──────────────────┤          │                          ├───────────────┼──────────────────────────────────────────────────────────────┤
│ binutils-x86-64-linux-gnu │ CVE-2017-13716   │          │                          │               │ binutils: Memory leak with the C++ symbol demangler routine  │
│                           │                  │          │                          │               │ in libiberty                                                 │
│                           │                  │          │                          │               │ https://avd.aquasec.com/nvd/cve-2017-13716                   │
│                           ├──────────────────┤          │                          ├───────────────┼──────────────────────────────────────────────────────────────┤
│                           │ CVE-2018-20657   │          │                          │               │ libiberty: Memory leak in demangle_template function         │
│                           │                  │          │                          │               │ resulting in a denial of service...                          │
│                           │                  │          │                          │               │ https://avd.aquasec.com/nvd/cve-2018-20657                   │
│                           ├──────────────────┤          │                          ├───────────────┼──────────────────────────────────────────────────────────────┤
│                           │ CVE-2019-1010204 │          │                          │               │ binutils: Improper Input Validation, Signed/Unsigned         │
│                           │                  │          │                          │               │ Comparison, Out-of-bounds Read in gold/fileread.cc and       │
│                           │                  │          │                          │               │ elfcpp/elfcpp_file.h...                                      │
│                           │                  │          │                          │               │ https://avd.aquasec.com/nvd/cve-2019-1010204                 │
│                           ├──────────────────┤          │                          ├───────────────┼──────────────────────────────────────────────────────────────┤
│                           │ CVE-2021-3530    │          │                          │               │ binutils: stack memory exhaustion in demangle_path() in      │
│                           │                  │          │                          │               │ rust-demangle.c                                              │
│                           │                  │          │                          │               │ https://avd.aquasec.com/nvd/cve-2021-3530                    │
├───────────────────────────┼──────────────────┤          ├──────────────────────────┼───────────────┼──────────────────────────────────────────────────────────────┤
│ coreutils                 │ CVE-2016-2781    │          │ 8.32-4.1ubuntu1          │               │ coreutils: Non-privileged session can escape to the parent   │
│                           │                  │          │                          │               │ session in chroot                                            │
│                           │                  │          │                          │               │ https://avd.aquasec.com/nvd/cve-2016-2781                    │
├───────────────────────────┼──────────────────┼──────────┼──────────────────────────┼───────────────┼──────────────────────────────────────────────────────────────┤
│ curl                      │ CVE-2022-43551   │ MEDIUM   │ 7.81.0-1ubuntu1.6        │               │ curl: HSTS bypass via IDN                                    │
│                           │                  │          │                          │               │ https://avd.aquasec.com/nvd/cve-2022-43551                   │
│                           ├──────────────────┤          │                          ├───────────────┼──────────────────────────────────────────────────────────────┤
│                           │ CVE-2022-43552   │          │                          │               │ curl: HTTP Proxy deny use-after-free                         │
│                           │                  │          │                          │               │ https://avd.aquasec.com/nvd/cve-2022-43552                   │
├───────────────────────────┼──────────────────┼──────────┼──────────────────────────┼───────────────┼──────────────────────────────────────────────────────────────┤
│ gpgv                      │ CVE-2022-3219    │ LOW      │ 2.2.27-3ubuntu2.1        │               │ gnupg: denial of service issue (resource consumption) using  │
│                           │                  │          │                          │               │ compressed packets                                           │
│                           │                  │          │                          │               │ https://avd.aquasec.com/nvd/cve-2022-3219                    │
├───────────────────────────┼──────────────────┤          ├──────────────────────────┼───────────────┼──────────────────────────────────────────────────────────────┤
│ libbinutils               │ CVE-2017-13716   │          │ 2.38-4ubuntu2.1          │               │ binutils: Memory leak with the C++ symbol demangler routine  │
│                           │                  │          │                          │               │ in libiberty                                                 │
│                           │                  │          │                          │               │ https://avd.aquasec.com/nvd/cve-2017-13716                   │
│                           ├──────────────────┤          │                          ├───────────────┼──────────────────────────────────────────────────────────────┤
│                           │ CVE-2018-20657   │          │                          │               │ libiberty: Memory leak in demangle_template function         │
│                           │                  │          │                          │               │ resulting in a denial of service...                          │
│                           │                  │          │                          │               │ https://avd.aquasec.com/nvd/cve-2018-20657                   │
│                           ├──────────────────┤          │                          ├───────────────┼──────────────────────────────────────────────────────────────┤
│                           │ CVE-2019-1010204 │          │                          │               │ binutils: Improper Input Validation, Signed/Unsigned         │
│                           │                  │          │                          │               │ Comparison, Out-of-bounds Read in gold/fileread.cc and       │
│                           │                  │          │                          │               │ elfcpp/elfcpp_file.h...                                      │
│                           │                  │          │                          │               │ https://avd.aquasec.com/nvd/cve-2019-1010204                 │
│                           ├──────────────────┤          │                          ├───────────────┼──────────────────────────────────────────────────────────────┤
│                           │ CVE-2021-3530    │          │                          │               │ binutils: stack memory exhaustion in demangle_path() in      │
│                           │                  │          │                          │               │ rust-demangle.c                                              │
│                           │                  │          │                          │               │ https://avd.aquasec.com/nvd/cve-2021-3530                    │
├───────────────────────────┼──────────────────┤          ├──────────────────────────┼───────────────┼──────────────────────────────────────────────────────────────┤
│ libc-bin                  │ CVE-2016-20013   │          │ 2.35-0ubuntu3.1          │               │ sha256crypt and sha512crypt through 0.6 allow attackers to   │
│                           │                  │          │                          │               │ cause a denial of...                                         │
│                           │                  │          │                          │               │ https://avd.aquasec.com/nvd/cve-2016-20013                   │
├───────────────────────────┤                  │          │                          ├───────────────┤                                                              │
│ libc6                     │                  │          │                          │               │                                                              │
│                           │                  │          │                          │               │                                                              │
│                           │                  │          │                          │               │                                                              │
├───────────────────────────┼──────────────────┤          ├──────────────────────────┼───────────────┼──────────────────────────────────────────────────────────────┤
│ libctf-nobfd0             │ CVE-2017-13716   │          │ 2.38-4ubuntu2.1          │               │ binutils: Memory leak with the C++ symbol demangler routine  │
│                           │                  │          │                          │               │ in libiberty                                                 │
│                           │                  │          │                          │               │ https://avd.aquasec.com/nvd/cve-2017-13716                   │
│                           ├──────────────────┤          │                          ├───────────────┼──────────────────────────────────────────────────────────────┤
│                           │ CVE-2018-20657   │          │                          │               │ libiberty: Memory leak in demangle_template function         │
│                           │                  │          │                          │               │ resulting in a denial of service...                          │
│                           │                  │          │                          │               │ https://avd.aquasec.com/nvd/cve-2018-20657                   │
│                           ├──────────────────┤          │                          ├───────────────┼──────────────────────────────────────────────────────────────┤
│                           │ CVE-2019-1010204 │          │                          │               │ binutils: Improper Input Validation, Signed/Unsigned         │
│                           │                  │          │                          │               │ Comparison, Out-of-bounds Read in gold/fileread.cc and       │
│                           │                  │          │                          │               │ elfcpp/elfcpp_file.h...                                      │
│                           │                  │          │                          │               │ https://avd.aquasec.com/nvd/cve-2019-1010204                 │
│                           ├──────────────────┤          │                          ├───────────────┼──────────────────────────────────────────────────────────────┤
│                           │ CVE-2021-3530    │          │                          │               │ binutils: stack memory exhaustion in demangle_path() in      │
│                           │                  │          │                          │               │ rust-demangle.c                                              │
│                           │                  │          │                          │               │ https://avd.aquasec.com/nvd/cve-2021-3530                    │
├───────────────────────────┼──────────────────┤          │                          ├───────────────┼──────────────────────────────────────────────────────────────┤
│ libctf0                   │ CVE-2017-13716   │          │                          │               │ binutils: Memory leak with the C++ symbol demangler routine  │
│                           │                  │          │                          │               │ in libiberty                                                 │
│                           │                  │          │                          │               │ https://avd.aquasec.com/nvd/cve-2017-13716                   │
│                           ├──────────────────┤          │                          ├───────────────┼──────────────────────────────────────────────────────────────┤
│                           │ CVE-2018-20657   │          │                          │               │ libiberty: Memory leak in demangle_template function         │
│                           │                  │          │                          │               │ resulting in a denial of service...                          │
│                           │                  │          │                          │               │ https://avd.aquasec.com/nvd/cve-2018-20657                   │
│                           ├──────────────────┤          │                          ├───────────────┼──────────────────────────────────────────────────────────────┤
│                           │ CVE-2019-1010204 │          │                          │               │ binutils: Improper Input Validation, Signed/Unsigned         │
│                           │                  │          │                          │               │ Comparison, Out-of-bounds Read in gold/fileread.cc and       │
│                           │                  │          │                          │               │ elfcpp/elfcpp_file.h...                                      │
│                           │                  │          │                          │               │ https://avd.aquasec.com/nvd/cve-2019-1010204                 │
│                           ├──────────────────┤          │                          ├───────────────┼──────────────────────────────────────────────────────────────┤
│                           │ CVE-2021-3530    │          │                          │               │ binutils: stack memory exhaustion in demangle_path() in      │
│                           │                  │          │                          │               │ rust-demangle.c                                              │
│                           │                  │          │                          │               │ https://avd.aquasec.com/nvd/cve-2021-3530                    │
├───────────────────────────┼──────────────────┼──────────┼──────────────────────────┼───────────────┼──────────────────────────────────────────────────────────────┤
│ libcurl4                  │ CVE-2022-43551   │ MEDIUM   │ 7.81.0-1ubuntu1.6        │               │ curl: HSTS bypass via IDN                                    │
│                           │                  │          │                          │               │ https://avd.aquasec.com/nvd/cve-2022-43551                   │
│                           ├──────────────────┤          │                          ├───────────────┼──────────────────────────────────────────────────────────────┤
│                           │ CVE-2022-43552   │          │                          │               │ curl: HTTP Proxy deny use-after-free                         │
│                           │                  │          │                          │               │ https://avd.aquasec.com/nvd/cve-2022-43552                   │
├───────────────────────────┼──────────────────┼──────────┼──────────────────────────┼───────────────┼──────────────────────────────────────────────────────────────┤
│ libncurses6               │ CVE-2022-29458   │ LOW      │ 6.3-2                    │               │ ncurses: segfaulting OOB read                                │
│                           │                  │          │                          │               │ https://avd.aquasec.com/nvd/cve-2022-29458                   │
├───────────────────────────┤                  │          │                          ├───────────────┤                                                              │
│ libncursesw6              │                  │          │                          │               │                                                              │
│                           │                  │          │                          │               │                                                              │
├───────────────────────────┼──────────────────┤          ├──────────────────────────┼───────────────┼──────────────────────────────────────────────────────────────┤
│ libpcre3                  │ CVE-2017-11164   │          │ 2:8.39-13ubuntu0.22.04.1 │               │ pcre: OP_KETRMAX feature in the match function in            │
│                           │                  │          │                          │               │ pcre_exec.c                                                  │
│                           │                  │          │                          │               │ https://avd.aquasec.com/nvd/cve-2017-11164                   │
├───────────────────────────┼──────────────────┤          ├──────────────────────────┼───────────────┼──────────────────────────────────────────────────────────────┤
│ libpng16-16               │ CVE-2022-3857    │          │ 1.6.37-3build5           │               │ libpng: Null pointer dereference leads to segmentation fault │
│                           │                  │          │                          │               │ https://avd.aquasec.com/nvd/cve-2022-3857                    │
├───────────────────────────┼──────────────────┤          ├──────────────────────────┼───────────────┼──────────────────────────────────────────────────────────────┤
│ libssl3                   │ CVE-2022-3996    │          │ 3.0.2-0ubuntu1.7         │               │ openssl: double locking leads to denial of service           │
│                           │                  │          │                          │               │ https://avd.aquasec.com/nvd/cve-2022-3996                    │
├───────────────────────────┼──────────────────┼──────────┼──────────────────────────┼───────────────┼──────────────────────────────────────────────────────────────┤
│ libsystemd0               │ CVE-2022-3821    │ MEDIUM   │ 249.11-0ubuntu3.6        │               │ systemd: buffer overrun in format_timespan() function        │
│                           │                  │          │                          │               │ https://avd.aquasec.com/nvd/cve-2022-3821                    │
├───────────────────────────┼──────────────────┼──────────┼──────────────────────────┼───────────────┼──────────────────────────────────────────────────────────────┤
│ libtinfo6                 │ CVE-2022-29458   │ LOW      │ 6.3-2                    │               │ ncurses: segfaulting OOB read                                │
│                           │                  │          │                          │               │ https://avd.aquasec.com/nvd/cve-2022-29458                   │
├───────────────────────────┼──────────────────┼──────────┼──────────────────────────┼───────────────┼──────────────────────────────────────────────────────────────┤
│ libudev1                  │ CVE-2022-3821    │ MEDIUM   │ 249.11-0ubuntu3.6        │               │ systemd: buffer overrun in format_timespan() function        │
│                           │                  │          │                          │               │ https://avd.aquasec.com/nvd/cve-2022-3821                    │
├───────────────────────────┼──────────────────┼──────────┼──────────────────────────┼───────────────┼──────────────────────────────────────────────────────────────┤
│ locales                   │ CVE-2016-20013   │ LOW      │ 2.35-0ubuntu3.1          │               │ sha256crypt and sha512crypt through 0.6 allow attackers to   │
│                           │                  │          │                          │               │ cause a denial of...                                         │
│                           │                  │          │                          │               │ https://avd.aquasec.com/nvd/cve-2016-20013                   │
├───────────────────────────┼──────────────────┤          ├──────────────────────────┼───────────────┼──────────────────────────────────────────────────────────────┤
│ ncurses-base              │ CVE-2022-29458   │          │ 6.3-2                    │               │ ncurses: segfaulting OOB read                                │
│                           │                  │          │                          │               │ https://avd.aquasec.com/nvd/cve-2022-29458                   │
├───────────────────────────┤                  │          │                          ├───────────────┤                                                              │
│ ncurses-bin               │                  │          │                          │               │                                                              │
│                           │                  │          │                          │               │                                                              │
├───────────────────────────┼──────────────────┤          ├──────────────────────────┼───────────────┼──────────────────────────────────────────────────────────────┤
│ openssl                   │ CVE-2022-3996    │          │ 3.0.2-0ubuntu1.7         │               │ openssl: double locking leads to denial of service           │
│                           │                  │          │                          │               │ https://avd.aquasec.com/nvd/cve-2022-3996                    │
├───────────────────────────┼──────────────────┼──────────┼──────────────────────────┼───────────────┼──────────────────────────────────────────────────────────────┤
│ wget                      │ CVE-2021-31879   │ MEDIUM   │ 1.21.2-2ubuntu1          │               │ wget: authorization header disclosure on redirect            │
│                           │                  │          │                          │               │ https://avd.aquasec.com/nvd/cve-2021-31879                   │
└───────────────────────────┴──────────────────┴──────────┴──────────────────────────┴───────────────┴──────────────────────────────────────────────────────────────┘
dgutson commented 1 year ago

@simonbrowndotje we know :) https://github.com/aquasecurity/trivy/issues/3329

CVSS is critical, and docker desktop shows it as critical. That's why I mentioned a difference in categorization.