CVE-2025-5509

6.3 MEDIUM

📋 TL;DR

This critical vulnerability in quequnlong shiyi-blog allows remote attackers to perform path traversal attacks via the /api/file/upload endpoint. By manipulating the file/source parameter, attackers can write files to arbitrary locations on the server. All users running shiyi-blog version 1.2.1 or earlier are affected.

💻 Affected Systems

Products:
  • quequnlong shiyi-blog
Versions: up to and including 1.2.1
Operating Systems: All platforms running Java
Default Config Vulnerable: ⚠️ Yes
Notes: The vulnerability exists in the default configuration of the /api/file/upload endpoint

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Remote code execution leading to complete system compromise, data theft, or ransomware deployment

🟠

Likely Case

Unauthorized file writes to sensitive directories, potentially enabling web shell deployment or data manipulation

🟢

If Mitigated

Limited file system access restricted to non-critical directories with proper input validation

🌐 Internet-Facing: HIGH - The vulnerable endpoint is accessible remotely without authentication
🏢 Internal Only: MEDIUM - Internal attackers could still exploit this but would need network access

🎯 Exploit Status

Public PoC: ⚠️ Yes
Weaponized: LIKELY
Unauthenticated Exploit: ⚠️ Yes
Complexity: LOW

Public exploit details are available in GitHub repositories, making exploitation straightforward

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Unknown

Vendor Advisory: None available

Restart Required: No

Instructions:

No official patch available. Vendor was contacted but did not respond. Consider alternative software or implement workarounds.

🔧 Temporary Workarounds

Input Validation Filter

all

Implement server-side validation to reject path traversal sequences in file upload parameters

Implement Java filter to sanitize 'file/source' parameter before processing

Web Application Firewall Rule

all

Block requests containing path traversal patterns to the vulnerable endpoint

WAF rule: Block requests to /api/file/upload containing '../', '..\\', or similar traversal patterns

🧯 If You Can't Patch

  • Disable or restrict access to the /api/file/upload endpoint
  • Implement strict file upload restrictions and store files outside web root with random names

🔍 How to Verify

Check if Vulnerable:

Test if the /api/file/upload endpoint accepts file paths containing '../' sequences in the file/source parameter

Check Version:

Check application version in configuration files or via application metadata

Verify Fix Applied:

Verify that path traversal attempts are rejected with proper error messages and no file writes occur

📡 Detection & Monitoring

Log Indicators:

  • Multiple failed upload attempts with '../' patterns
  • Unusual file write operations to system directories

Network Indicators:

  • HTTP POST requests to /api/file/upload with traversal sequences in parameters

SIEM Query:

source="web_logs" AND uri_path="/api/file/upload" AND (param="../" OR param="..\\")

🔗 References

📤 Share & Export