Patchfirst
CVE-2021-21234 Public exploit High · 7.7 EPSS 21.2%

Directory Traversal

Fix:upgrade spring-boot-actuator-logview to 0.2.13 or later Details ↓

lukashinsch · spring-boot-actuator-logview

Summary

The spring-boot-actuator-logview library (Maven package eu.hinsch:spring-boot-actuator-logview) contains a directory traversal flaw in its log viewer actuator endpoint: the filename parameter is checked against traversal, but the base folder parameter is not, so the base folder can be used to reach files outside the logging directory. An attacker who can send requests to the logview endpoint and has valid authentication to it can read arbitrary files the application's user can access, by supplying a traversal sequence such as ../ in the base parameter.

Official description · CVE.org

spring-boot-actuator-logview in a library that adds a simple logfile viewer as spring boot actuator endpoint. It is maven package "eu.hinsch:spring-boot-actuator-logview". In spring-boot-actuator-logview before version 0.2.13 there is a directory traversal vulnerability. The nature of this library is to expose a log file directory via admin (spring boot actuator) HTTP endpoints. Both the filename to view and a base folder (relative to the logging folder root) can be specified via request parameters. While the filename parameter was checked to prevent directory traversal exploits (so that `filename=../somefile` would not work), the base folder parameter was not sufficiently checked, so that `filename=somefile&base=../` could access a file outside the logging base directory). The vulnerability has been patched in release 0.2.13. Any users of 0.2.12 should be able to update without any issues as there are no other changes in that release. There is no workaround to fix the vulnerability other than updating or removing the dependency. However, removing read access of the user the application is run with to any directory not required for running the application can limit the impact. Additionally, access to the logview endpoint can be limited by deploying the application behind a reverse proxy.

Breakdown
64.9 / 100
Exploited
Yes, in VulnCheck KEV
Reports
0
Tactics
0/15

First seen exploited 3 years after disclosure. Public exploit code (PoC-in-GitHub) appeared 5 months after disclosure.

  1. Disclosedday 0
  2. Public exploit codePoC-in-GitHub+5 mo
  3. First seen exploitedVulnCheck KEV evidence+3 yrs

Affected versions and fixes

as published in the CVE record

lukashinsch spring-boot-actuator-logview

Affected: < 0.2.13

Am I affected? What do I upgrade to?

From GitHub Security Advisories and OSV

1 package in 1 ecosystem. Main package: eu.hinsch:spring-boot-actuator-logview.

Maveneu.hinsch:spring-boot-actuator-logviewGHSA-p4q6-qxjx-8jgp

Upgrade to 0.2.13 or later

Set the version to 0.2.13 or later in your pom.xml or build.gradle.

The first fix for CVE-2021-21234. No other CVE tracked by Patchfirst affects this package.

Affected versions

If you runUpgrade to
All versions before 0.2.130.2.13

“Up to” means the second version is the fix and is not affected.

Check your lockfile against all CVEs

References

4 links, grouped by NVD tag
↑ ↓ chooseEnter openEsc close