Ciao! Ho recentemente scaricato l’immagine Docker ufficiale di Discourse e l’ho analizzata con Trivy (uno scanner di sicurezza e vulnerabilità). Il risultato mostra diverse vulnerabilità:
$ trivy image --vuln-type library discourse/base:release
...
Node.js (node-pkg)
Totale: 19 (UNKNOWN: 0, LOW: 1, MEDIUM: 1, HIGH: 15, CRITICAL: 2)
┌─────────────────────────────────────┬─────────────────────┬──────────┬───────────────────┬────────────────────────────┬──────────────────────────────────────────────────────────────┐
│ Libreria │ Vulnerabilità │ Gravità │ Versione Installata │ Versione Corretta │ Titolo │
├─────────────────────────────────────┼─────────────────────┼──────────┼───────────────────┼────────────────────────────┼──────────────────────────────────────────────────────────────┤
│ ansi-html (package.json) │ CVE-2021-23424 │ HIGH │ 0.0.7 │ 0.0.8 │ nodejs-ansi-html: ReDoS tramite stringa appositamente creata │
│ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2021-23424 │
├─────────────────────────────────────┼─────────────────────┤ ├───────────────────┼────────────────────────────┼──────────────────────────────────────────────────────────────┤
│ ansi-regex (package.json) │ CVE-2021-3807 │ │ 3.0.0 │ 3.0.1, 4.1.1, 5.0.1, 6.0.1 │ nodejs-ansi-regex: Denial of Service tramite espressione regolare │
│ │ │ │ │ │ (ReDoS) per il matching dei codici di escape ANSI │
│ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2021-3807 │
│ │ │ │ │ │ │
│ │ │ │ │ │ │
│ │ │ │ │ │ │
│ │ │ │ │ │ │
│ │ │ │ │ │ │
│ │ │ │ │ │ │
│ │ │ │ │ │ │
│ │ │ │ │ │ │
│ │ │ ├───────────────────┤ │ │
│ │ │ │ 4.1.0 │ │ │
│ │ │ │ │ │ │
│ │ │ │ │ │ │
│ │ │ │ │ │ │
│ │ │ │ │ │ │
│ │ │ │ │ │ │
├─────────────────────────────────────┼─────────────────────┼──────────┼───────────────────┼────────────────────────────┼──────────────────────────────────────────────────────────────┤
│ clean-css (package.json) │ GHSA-wxhq-pm8v-cw75 │ LOW │ 3.4.28 │ 4.1.11 │ Denial of Service tramite espressione regolare in clean-css │
│ │ │ │ │ │ https://github.com/advisories/GHSA-wxhq-pm8v-cw75 │
├─────────────────────────────────────┼─────────────────────┼──────────┼───────────────────┼────────────────────────────┼──────────────────────────────────────────────────────────────┤
│ engine.io (package.json) │ CVE-2023-31125 │ MEDIUM │ 6.2.1 │ 6.4.2 │ Eccezione non gestita in engine.io │
│ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2023-31125 │
├─────────────────────────────────────┼─────────────────────┼──────────┼───────────────────┼────────────────────────────┼──────────────────────────────────────────────────────────────┤
│ http-cache-semantics (package.json) │ CVE-2022-25881 │ HIGH │ 4.1.0 │ 4.1.1 │ Vulnerabilità di Denial of Service tramite espressione regolare (ReDoS) │
│ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2022-25881 │
├─────────────────────────────────────┼─────────────────────┤ ├───────────────────┼────────────────────────────┼──────────────────────────────────────────────────────────────┤
│ json5 (package.json) │ CVE-2022-46175 │ │ 0.5.1 │ 1.0.2, 2.2.2 │ json5: Inquinamento del prototipo in JSON5 tramite metodo Parse │
│ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2022-46175 │
│ │ │ ├───────────────────┤ │ │
│ │ │ │ 1.0.1 │ │ │
│ │ │ │ │ │ │
├─────────────────────────────────────┼─────────────────────┼──────────┼───────────────────┼────────────────────────────┼──────────────────────────────────────────────────────────────┤
│ loader-utils (package.json) │ CVE-2022-37601 │ CRITICAL │ 2.0.2 │ 1.4.1, 2.0.3 │ loader-utils: inquinamento del prototipo nella funzione parseQuery in │
│ │ │ │ │ │ parseQuery.js │
│ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2022-37601 │
│ ├─────────────────────┼──────────┤ ├────────────────────────────┼──────────────────────────────────────────────────────────────┤
│ │ CVE-2022-37599 │ HIGH │ │ 3.2.1, 2.0.4, 1.4.2 │ È stata rilevata una falla di Denial of Service tramite espressione regolare (ReDoS) │
│ │ │ │ │ │ in Funct... │
│ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2022-37599 │
│ ├─────────────────────┤ │ │ ├──────────────────────────────────────────────────────────────┤
│ │ CVE-2022-37603 │ │ │ │ loader-utils: Denial of Service tramite espressione regolare │
│ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2022-37603 │
├─────────────────────────────────────┼─────────────────────┤ ├───────────────────┼────────────────────────────┼──────────────────────────────────────────────────────────────┤
│ minimatch (package.json) │ CVE-2016-10540 │ │ 0.2.14 │ 3.0.2 │ Minimatch è un'utilità di matching minimale che funziona convertendo glob ... │
│ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2016-10540 │
│ ├─────────────────────┤ │ ├────────────────────────────┼──────────────────────────────────────────────────────────────┤
│ │ CVE-2022-3517 │ │ │ 3.0.5 │ ReDoS tramite la funzione braceExpand │
│ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2022-3517 │
│ ├─────────────────────┤ │ ├────────────────────────────┼──────────────────────────────────────────────────────────────┤
│ │ NSWG-ECO-118 │ │ │ >=3.0.2 │ Denial of Service tramite espressione regolare │
├─────────────────────────────────────┼─────────────────────┤ ├───────────────────┼────────────────────────────┼──────────────────────────────────────────────────────────────┤
│ taffydb (package.json) │ CVE-2019-10790 │ │ 2.6.2 │ │ TaffyDB può consentire l'accesso a qualsiasi elemento dati nel DB │
│ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2019-10790 │
│ │ │ ├───────────────────┼────────────────────────────┤ │
│ │ │ │ 2.7.3 │ │ │
│ │ │ │ │ │ │
├─────────────────────────────────────┼─────────────────────┼──────────┼───────────────────┼────────────────────────────┼──────────────────────────────────────────────────────────────┤
│ underscore (package.json) │ CVE-2021-23358 │ CRITICAL │ 1.3.3 │ 1.12.1 │ nodejs-underscore: Esecuzione arbitraria di codice tramite la funzione template │
│ │ │ │ │ │ https://avd.aquasec.com/nvd/cve-2021-23358 │
└─────────────────────────────────────┴─────────────────────┴──────────┴───────────────────┴────────────────────────────┴──────────────────────────────────────────────────────────────┘
2023-05-16T18:33:20.715+0200 INFO Il risultato della tabella include solo i nomi dei file dei pacchetti. Utilizza l'opzione '--format json' per ottenere il percorso completo del file del pacchetto.
...
Questo è un estratto delle vulnerabilità riportate, con l’elenco completo che include oltre 20 voci:
CVE-2015-9284, CVE-2016-10540, CVE-2019-10790, CVE-2020-26235, CVE-2021-23358, CVE-2021-23424, CVE-2021-32810, CVE-2021-3807, CVE-2022-23639, CVE-2022-24713, CVE-2022-25881, CVE-2022-32149, CVE-2022-3517, CVE-2022-37599, CVE-2022-37601, CVE-2022-37603, CVE-2022-46175, CVE-2023-31125, GHSA-2qv5-7mw5-j3cg, GHSA-f85w-wvc7-crwc, GHSA-mc8h-8q98-g5hr, GHSA-rc23-xxgq-x27g, GHSA-wxhq-pm8v-cw75, NSWG-ECO-118
Qual è lo stato di queste vulnerabilità? Avete intenzione di risolverle in una prossima release?
Grazie mille in anticipo!