amaybaum-dev / verademo2

A deliberately insecure Java web application
MIT License
0 stars 1 forks source link

commons-io-2.4.jar: 1 vulnerabilities (highest severity is: 4.8) reachable - autoclosed #26

Closed dev-mend-for-github-com[bot] closed 1 year ago

dev-mend-for-github-com[bot] commented 1 year ago
Vulnerable Library - commons-io-2.4.jar

The Commons IO library contains utility classes, stream implementations, file filters, file comparators, endian transformation classes, and much more.

Library home page: http://commons.apache.org/io/

Path to dependency file: /app/pom.xml

Path to vulnerable library: /home/wss-scanner/.m2/repository/commons-io/commons-io/2.4/commons-io-2.4.jar,/app/target/verademo/WEB-INF/lib/commons-io-2.4.jar

Vulnerabilities

CVE Severity CVSS Dependency Type Fixed in (commons-io version) Remediation Possible** Reachability
CVE-2021-29425 Medium 4.8 commons-io-2.4.jar Direct 2.7

**In some cases, Remediation PR cannot be created automatically for a vulnerability despite the availability of remediation

Details

CVE-2021-29425 ### Vulnerable Library - commons-io-2.4.jar

The Commons IO library contains utility classes, stream implementations, file filters, file comparators, endian transformation classes, and much more.

Library home page: http://commons.apache.org/io/

Path to dependency file: /app/pom.xml

Path to vulnerable library: /home/wss-scanner/.m2/repository/commons-io/commons-io/2.4/commons-io-2.4.jar,/app/target/verademo/WEB-INF/lib/commons-io-2.4.jar

Dependency Hierarchy: - :x: **commons-io-2.4.jar** (Vulnerable Library)

Found in base branch: main

### Reachability Analysis

This vulnerability is potentially used ``` com.veracode.verademo.controller.UserController (Application) -> org.springframework.web.multipart.commons.CommonsMultipartResolver$1 (Extension) -> org.springframework.web.multipart.commons.CommonsFileUploadSupport (Extension) -> org.apache.commons.io.FileCleaningTracker (Extension) ... -> org.apache.commons.io.FileDeleteStrategy$ForceFileDeleteStrategy (Extension) -> org.apache.commons.io.FileUtils (Extension) -> ❌ org.apache.commons.io.FilenameUtils (Vulnerable Component) ```

### Vulnerability Details

In Apache Commons IO before 2.7, When invoking the method FileNameUtils.normalize with an improper input string, like "//../foo", or "\\..\foo", the result would be the same value, thus possibly providing access to files in the parent directory, but not further above (thus "limited" path traversal), if the calling code would use the result to construct a path value.

Publish Date: 2021-04-13

URL: CVE-2021-29425

### CVSS 3 Score Details (4.8)

Base Score Metrics: - Exploitability Metrics: - Attack Vector: Network - Attack Complexity: High - Privileges Required: None - User Interaction: None - Scope: Unchanged - Impact Metrics: - Confidentiality Impact: Low - Integrity Impact: Low - Availability Impact: None

For more information on CVSS3 Scores, click here.

### Suggested Fix

Type: Upgrade version

Origin: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-29425

Release Date: 2021-04-13

Fix Resolution: 2.7

:rescue_worker_helmet: Automatic Remediation will be attempted for this issue.

:rescue_worker_helmet:Automatic Remediation will be attempted for this issue.

dev-mend-for-github-com[bot] commented 1 year ago

:heavy_check_mark: This issue was automatically closed by Mend because the vulnerable library in the specific branch(es) was either marked as ignored or it is no longer part of the Mend inventory.