cebe / php-openapi

Read and write OpenAPI yaml/json files and make the content accessible in PHP objects.
MIT License
464 stars 87 forks source link

Security vulnerabilities funded by trivy #205

Open zyv4yk opened 3 weeks ago

zyv4yk commented 3 weeks ago

When building a Docker image using this package, and then performing a Trivy scan on it, it reports some vulnerability errors please fix

vendor/cebe/php-openapi/yarn.lock (yarn)
========================================
Total: 21 (MEDIUM: 9, HIGH: 8, CRITICAL: 4)

┌──────────────┬─────────────────────┬──────────┬────────┬───────────────────┬──────────────────────────────────────────────────────────┬──────────────────────────────────────────────────────────────┐
│   Library    │    Vulnerability    │ Severity │ Status │ Installed Version │                      Fixed Version                       │                            Title                             │
├──────────────┼─────────────────────┼──────────┼────────┼───────────────────┼──────────────────────────────────────────────────────────┼──────────────────────────────────────────────────────────────┤
│ ajv          │ CVE-2020-15366      │ MEDIUM   │ fixed  │ 5.5.2             │ 6.12.3                                                   │ nodejs-ajv: prototype pollution via crafted JSON schema in   │
│              │                     │          │        │                   │                                                          │ ajv.validate function                                        │
│              │                     │          │        │                   │                                                          │ https://avd.aquasec.com/nvd/cve-2020-15366                   │
├──────────────┼─────────────────────┼──────────┤        ├───────────────────┼──────────────────────────────────────────────────────────┼──────────────────────────────────────────────────────────────┤
│ ansi-regex   │ CVE-2021-3807       │ HIGH     │        │ 3.0.0             │ 6.0.1, 5.0.1, 4.1.1, 3.0.1                               │ nodejs-ansi-regex: Regular expression denial of service      │
│              │                     │          │        │                   │                                                          │ (ReDoS) matching ANSI escape codes                           │
│              │                     │          │        │                   │                                                          │ https://avd.aquasec.com/nvd/cve-2021-3807                    │
├──────────────┼─────────────────────┼──────────┤        ├───────────────────┼──────────────────────────────────────────────────────────┼──────────────────────────────────────────────────────────────┤
│ dompurify    │ GHSA-mjjq-c88q-qhr6 │ CRITICAL │        │ 1.0.11            │ 2.0.7                                                    │ Cross-Site Scripting in dompurify                            │
│              │                     │          │        │                   │                                                          │ https://github.com/advisories/GHSA-mjjq-c88q-qhr6            │
│              ├─────────────────────┼──────────┤        │                   ├──────────────────────────────────────────────────────────┼──────────────────────────────────────────────────────────────┤
│              │ CVE-2019-16728      │ MEDIUM   │        │                   │ 2.0.3                                                    │ DOMPurify before 2.0.1 allows XSS because of innerHTML       │
│              │                     │          │        │                   │                                                          │ mutation XSS (m ......                                       │
│              │                     │          │        │                   │                                                          │ https://avd.aquasec.com/nvd/cve-2019-16728                   │
│              ├─────────────────────┤          │        │                   ├──────────────────────────────────────────────────────────┼──────────────────────────────────────────────────────────────┤
│              │ CVE-2020-26870      │          │        │                   │ 2.0.17                                                   │ Cure53 DOMPurify before 2.0.17 allows mutation XSS. This     │
│              │                     │          │        │                   │                                                          │ occurs becaus ...                                            │
│              │                     │          │        │                   │                                                          │ https://avd.aquasec.com/nvd/cve-2020-26870                   │
├──────────────┼─────────────────────┼──────────┤        ├───────────────────┼──────────────────────────────────────────────────────────┼──────────────────────────────────────────────────────────────┤
│ ejs          │ CVE-2022-29078      │ CRITICAL │        │ 2.7.4             │ 3.1.7                                                    │ ejs: server-side template injection in outputFunctionName    │
│              │                     │          │        │                   │                                                          │ https://avd.aquasec.com/nvd/cve-2022-29078                   │
│              ├─────────────────────┼──────────┤        │                   ├──────────────────────────────────────────────────────────┼──────────────────────────────────────────────────────────────┤
│              │ CVE-2024-33883      │ MEDIUM   │        │                   │ 3.1.10                                                   │ The ejs (aka Embedded JavaScript templates) package before   │
│              │                     │          │        │                   │                                                          │ 3.1.10 for ......                                            │
│              │                     │          │        │                   │                                                          │ https://avd.aquasec.com/nvd/cve-2024-33883                   │
├──────────────┼─────────────────────┤          │        ├───────────────────┼──────────────────────────────────────────────────────────┼──────────────────────────────────────────────────────────────┤
│ express      │ CVE-2024-29041      │          │        │ 4.17.2            │ 4.19.2, 5.0.0-beta.3                                     │ express: cause malformed URLs to be evaluated                │
│              │                     │          │        │                   │                                                          │ https://avd.aquasec.com/nvd/cve-2024-29041                   │
├──────────────┼─────────────────────┼──────────┤        ├───────────────────┼──────────────────────────────────────────────────────────┼──────────────────────────────────────────────────────────────┤
│ json-pointer │ CVE-2022-4742       │ CRITICAL │        │ 0.6.1             │ 0.6.2                                                    │ json-pointer: prototype pollution in json-pointer            │
│              │                     │          │        │                   │                                                          │ https://avd.aquasec.com/nvd/cve-2022-4742                    │
│              ├─────────────────────┼──────────┤        │                   │                                                          ├──────────────────────────────────────────────────────────────┤
│              │ CVE-2021-23820      │ MEDIUM   │        │                   │                                                          │ json-pointer: type confusion vulnerability can lead to a     │
│              │                     │          │        │                   │                                                          │ bypass of CVE-2020-7709 when...                              │
│              │                     │          │        │                   │                                                          │ https://avd.aquasec.com/nvd/cve-2021-23820                   │
├──────────────┼─────────────────────┼──────────┤        ├───────────────────┼──────────────────────────────────────────────────────────┼──────────────────────────────────────────────────────────────┤
│ json5        │ CVE-2022-46175      │ HIGH     │        │ 1.0.1             │ 2.2.2, 1.0.2                                             │ json5: Prototype Pollution in JSON5 via Parse Method         │
│              │                     │          │        │                   │                                                          │ https://avd.aquasec.com/nvd/cve-2022-46175                   │
├──────────────┼─────────────────────┼──────────┤        ├───────────────────┼──────────────────────────────────────────────────────────┼──────────────────────────────────────────────────────────────┤
│ jsonpointer  │ CVE-2021-23807      │ MEDIUM   │        │ 4.1.0             │ 5.0.0                                                    │ nodejs-jsonpointer: type confusion vulnerability can lead to │
│              │                     │          │        │                   │                                                          │ a bypass of a previous...                                    │
│              │                     │          │        │                   │                                                          │ https://avd.aquasec.com/nvd/cve-2021-23807                   │
├──────────────┼─────────────────────┼──────────┤        ├───────────────────┼──────────────────────────────────────────────────────────┼──────────────────────────────────────────────────────────────┤
│ loader-utils │ CVE-2022-37601      │ CRITICAL │        │ 1.4.0             │ 2.0.3, 1.4.1                                             │ loader-utils: prototype pollution in function parseQuery in  │
│              │                     │          │        │                   │                                                          │ parseQuery.js                                                │
│              │                     │          │        │                   │                                                          │ https://avd.aquasec.com/nvd/cve-2022-37601                   │
│              ├─────────────────────┼──────────┤        │                   ├──────────────────────────────────────────────────────────┼──────────────────────────────────────────────────────────────┤
│              │ CVE-2022-37599      │ HIGH     │        │                   │ 1.4.2, 2.0.4, 3.2.1                                      │ loader-utils: regular expression denial of service in        │
│              │                     │          │        │                   │                                                          │ interpolateName.js                                           │
│              │                     │          │        │                   │                                                          │ https://avd.aquasec.com/nvd/cve-2022-37599                   │
│              ├─────────────────────┤          │        │                   │                                                          ├──────────────────────────────────────────────────────────────┤
│              │ CVE-2022-37603      │          │        │                   │                                                          │ loader-utils:Regular expression denial of service            │
│              │                     │          │        │                   │                                                          │ https://avd.aquasec.com/nvd/cve-2022-37603                   │
├──────────────┼─────────────────────┤          │        ├───────────────────┼──────────────────────────────────────────────────────────┼──────────────────────────────────────────────────────────────┤
│ marked       │ CVE-2022-21680      │          │        │ 0.6.3             │ 4.0.10                                                   │ marked: regular expression block.def may lead Denial of      │
│              │                     │          │        │                   │                                                          │ Service                                                      │
│              │                     │          │        │                   │                                                          │ https://avd.aquasec.com/nvd/cve-2022-21680                   │
│              ├─────────────────────┤          │        │                   │                                                          ├──────────────────────────────────────────────────────────────┤
│              │ CVE-2022-21681      │          │        │                   │                                                          │ marked: regular expression inline.reflinkSearch may lead     │
│              │                     │          │        │                   │                                                          │ Denial of Service                                            │
│              │                     │          │        │                   │                                                          │ https://avd.aquasec.com/nvd/cve-2022-21681                   │
├──────────────┼─────────────────────┤          │        ├───────────────────┼──────────────────────────────────────────────────────────┼──────────────────────────────────────────────────────────────┤
│ nconf        │ CVE-2022-21803      │          │        │ 0.10.0            │ 0.11.4                                                   │ nconf: Prototype pollution in memory store                   │
│              │                     │          │        │                   │                                                          │ https://avd.aquasec.com/nvd/cve-2022-21803                   │
├──────────────┼─────────────────────┤          │        ├───────────────────┼──────────────────────────────────────────────────────────┼──────────────────────────────────────────────────────────────┤
│ qs           │ CVE-2022-24999      │          │        │ 6.9.6             │ 6.10.3, 6.9.7, 6.8.3, 6.7.3, 6.6.1, 6.5.3, 6.4.1, 6.3.3, │ express: "qs" prototype poisoning causes the hang of the     │
│              │                     │          │        │                   │ 6.2.4                                                    │ node process                                                 │
│              │                     │          │        │                   │                                                          │ https://avd.aquasec.com/nvd/cve-2022-24999                   │
├──────────────┼─────────────────────┼──────────┤        ├───────────────────┼──────────────────────────────────────────────────────────┼──────────────────────────────────────────────────────────────┤
│ semver       │ CVE-2022-25883      │ MEDIUM   │        │ 5.7.1             │ 7.5.2, 6.3.1, 5.7.2                                      │ nodejs-semver: Regular expression denial of service          │
│              │                     │          │        │                   │                                                          │ https://avd.aquasec.com/nvd/cve-2022-25883                   │
├──────────────┼─────────────────────┤          │        ├───────────────────┼──────────────────────────────────────────────────────────┼──────────────────────────────────────────────────────────────┤
│ yargs-parser │ CVE-2020-7608       │          │        │ 11.1.1            │ 13.1.2, 15.0.1, 18.1.1, 5.0.1                            │ nodejs-yargs-parser: prototype pollution vulnerability       │
│              │                     │          │        │                   │                                                          │ https://avd.aquasec.com/nvd/cve-2020-7608                    │
└──────────────┴─────────────────────┴──────────┴────────┴───────────────────┴──────────────────────────────────────────────────────────┴──────────────────────────────────────────────────────────────┘