{"answers":{"affected":"2 open source packages ship an affected version, including eu.hinsch:spring-boot-actuator-logview. It affects 1 product.","exploited":"It is not confirmed as exploited in the wild, but public exploit code for CVE-2021-21234 exists.","fix":"Upgrade eu.hinsch:spring-boot-actuator-logview to 0.2.13 or later.","what":"CVE-2021-21234 is a high-severity path traversal vulnerability in lukashinsch spring-boot-actuator-logview, published on 5 Jan 2021. Any signed-in user can exploit it over the network, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2021-21234 and fix it if it is affected.\n\nWhat it is: CVE-2021-21234 is a high-severity path traversal vulnerability in lukashinsch spring-boot-actuator-logview, published on 5 Jan 2021. Any signed-in user can exploit it over the network, with no action from the victim.\nExploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2021-21234 exists.\n\nAffected packages and fixed versions:\n- eu.hinsch:spring-boot-actuator-logview (Maven): affected all versions; fixed in 0.2.13\n- eu.hinsch:spring-boot-actuator-logview (Maven): affected all versions; fixed in 0.2.13\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2021-21234/ (Markdown: https://insights.sbomify.com/CVE-2021-21234/index.md)","id":"CVE-2021-21234","markdown":"https://insights.sbomify.com/CVE-2021-21234/index.md","name":"CVE-2021-21234","record":{"aliases":["GHSA-p4q6-qxjx-8jgp"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["data_read"],"network_reachable":"yes","non_default_config":false,"product_category":"Spring Boot log viewer","requires_auth":"low_privilege","summary":"An attacker can read arbitrary files outside the logging directory by manipulating the base folder parameter in the log viewer endpoint.","user_interaction":"not_required","vuln_class":"path_traversal"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"spring-boot-actuator-logview","vendor":"spring-boot-actuator-logview_project"}],"cvss":{"score":7.7,"severity":"high","source":"cna","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N","version":"3.1"},"cwes":[{"id":"CWE-22","name":"Improper Limitation of a Pathname to a Restricted Directory"}],"description":"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\u0026base=../` 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.","ecosystems":["Maven"],"exploits":{"exploitdb":0,"first_seen":"2021-06-08","github_poc":2,"max_poc_stars":5,"metasploit":0,"nuclei":1,"refs":[{"date":"2021-10-19T01:08:48Z","kind":"github_poc","ref":"https://github.com/xiaojiangxl/CVE-2021-21234","stars":5,"title":null},{"date":"2021-06-08T15:31:54Z","kind":"github_poc","ref":"https://github.com/PwCNO-CTO/CVE-2021-21234","stars":1,"title":"Directory traversal vulnerability in the spring-boot-actuator-logview library"},{"date":null,"kind":"nuclei","ref":"http/cves/2021/CVE-2021-21234.yaml","stars":null,"title":"Spring Boot Actuator Logview Directory Traversal"}],"tier":"weaponised"},"has_fix":true,"headline":"Directory Traversal","id":"CVE-2021-21234","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"Maven","product":null,"products":[],"type":"path_traversal","year":"2021"},"n_packages":2,"n_references":4,"next":{"headline":"Infinite loop in parsing PNG files in","id":"CVE-2021-21235"},"packages":[{"ecosystem":"Maven","fixed":["0.2.13"],"introduced":["0"],"last_affected":[],"package":"eu.hinsch:spring-boot-actuator-logview","purl":null,"source":"GHSA-p4q6-qxjx-8jgp"},{"ecosystem":"Maven","fixed":["0.2.13"],"introduced":["0"],"last_affected":[],"package":"eu.hinsch:spring-boot-actuator-logview","purl":"pkg:maven/eu.hinsch/spring-boot-actuator-logview","source":"GHSA-p4q6-qxjx-8jgp"}],"prev":{"headline":"Memory corruption in Chrome","id":"CVE-2021-21233"},"products":["spring-boot-actuator-logview"],"published":"2021-01-05","related":[{"cvss_score":5.3,"headline":"Path traversal in n/a","id":"CVE-2023-29986","kev_date_added":null,"published":"2023-05-11"}],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"},{"class":"attribution","licence":"MIT","name":"Nuclei templates"},{"class":"open","licence":"CC0","name":"PoC-in-GitHub"}],"ssvc":{"automatable":null,"exploitation":null,"technical_impact":null},"state":"PUBLISHED","updated":"2024-08-03","vendors":["lukashinsch"]},"summary":"An attacker can read arbitrary files outside the logging directory by manipulating the base folder parameter in the log viewer endpoint.","url":"https://insights.sbomify.com/CVE-2021-21234/"}