CVE-2025-60541
📋 TL;DR
This Server-Side Request Forgery (SSRF) vulnerability in prompt-optimizer allows attackers to make the server send requests to internal resources that should not be accessible from outside. Attackers can scan internal networks, access internal services, or potentially escalate to other attacks. Users running prompt-optimizer versions 1.3.0 through 1.4.2 are affected.
💻 Affected Systems
- linshenkx prompt-optimizer
📦 What is this software?
⚠️ Risk & Real-World Impact
Worst Case
Attackers could access sensitive internal systems, steal credentials from metadata services, perform internal port scanning, or pivot to attack other internal resources.
Likely Case
Internal network reconnaissance, accessing internal APIs or services, potentially retrieving sensitive information from internal endpoints.
If Mitigated
Limited to scanning accessible internal resources without authentication to those resources.
🎯 Exploit Status
The GitHub issue shows exploitation details. SSRF vulnerabilities are commonly weaponized due to their utility in internal reconnaissance.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: v1.4.3 or later
Vendor Advisory: https://github.com/linshenkx/prompt-optimizer/issues/179
Restart Required: Yes
Instructions:
1. Update prompt-optimizer to version 1.4.3 or later. 2. Restart the prompt-optimizer service. 3. Verify the fix by testing the /api/proxy/ endpoint.
🔧 Temporary Workarounds
Network Segmentation
allRestrict network access to the prompt-optimizer instance and block outbound requests from the server to internal resources.
Disable Proxy Endpoint
allRemove or disable the /api/proxy/ endpoint if not required.
🧯 If You Can't Patch
- Implement strict network controls to limit the server's ability to connect to internal resources
- Deploy a web application firewall (WAF) with SSRF protection rules
🔍 How to Verify
Check if Vulnerable:
Test if you can make the /api/proxy/ endpoint request internal resources like http://localhost or internal IP addresses.
Check Version:
Check the package.json file or run: npm list prompt-optimizer
Verify Fix Applied:
After updating, test the /api/proxy/ endpoint to ensure it no longer allows requests to internal resources.
📡 Detection & Monitoring
Log Indicators:
- Unusual requests to /api/proxy/ with internal IPs or domains
- Outbound connections from the server to internal resources
Network Indicators:
- Unexpected traffic from the prompt-optimizer server to internal services
- Port scanning patterns originating from the server
SIEM Query:
source="prompt-optimizer" AND (uri_path="/api/proxy/" OR dest_ip IN (RFC1918_IP_RANGE))