new-api is vulnerable to SSRF Bypass

Description

Summary

A recently patched SSRF vulnerability contains a bypass method that can bypass the existing security fix and still allow SSRF to occur.
Because the existing fix only applies security restrictions to the first URL request, a 302 redirect can bypass existing security measures and successfully access the intranet.

Details

Use the following script to deploy on the attacker's server. Since ports 80, 443, and 8080 are default ports within the security range set by the administrator and will not be blocked, the service is deployed on port 8080.

from flask import Flask, redirect  

app = Flask(__name__)  

@app.route('/redirect')  
def ssrf_redirect():  
    return redirect('http://127.0.0.1:8003/uid.txt', code=302)  

if __name__ == '__main__':  
    app.run(host='0.0.0.0', port=8080)

Then, a request is made to the malicious service opened by the attacker, and it can be found that the resources on the intranet are successfully accessed.
<img width="663" height="60" alt="image" src="https://github.com/user-attachments/assets/2f296cff-510d-4cfe-8509-518e747bf8fe" />
At the same time, the locally opened service 127.0.0.1:8083/uid.txt also received related requests.
<img width="717" height="79" alt="image" src="https://github.com/user-attachments/assets/d6b6d2cc-280b-45b5-9946-10b7891bf017" />

Impact

Using 302 redirects to bypass previous SSRF security fixes

Basic information

Type
reviewed
Severity
high
Advisory on GitHub
Open advisory ↗
Repository advisory
Open repository advisory ↗
Source code
Browse source ↗
Published (advisory)
2025-11-24 20:05:21 UTC
Updated
2025-11-27 07:53:59 UTC
GitHub reviewed
2025-11-24 20:05:21 UTC
NVD published
2025-11-24

EPSS Score

Score Percentile
0.05% 16.06%

CVSS Scores

Base score Version Severity Vector
8.5 3.1
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:L/A:N Click to expand
Attack vector (AV:N)
Could be attacked over the internet or any normal routed network—not just someone sitting at the machine.
Attack complexity (AC:L)
Once they can reach the bug, pulling it off is straightforward—no weird race conditions or rare setup.
Privileges required (PR:L)
A normal user session is enough; they don’t have to be admin.
User interaction (UI:N)
Nobody has to click “OK” or open a trap file; it can work without a victim helping.
Scope (S:C)
Breaking this can reach past the original component and bite other resources—bigger blast radius.
Confidentiality (C:H)
Serious risk that confidential data gets exposed in a big way.
Integrity (I:L)
Attackers could change some data, but it’s limited—not everything goes.
Availability (A:N)
Service keeps running; no real outage angle.

Identifiers

CWEs

CWE id Name
CWE-918 Server-Side Request Forgery (SSRF)

Credits

  • h3rrr (reporter)
  • Calcium-Ion (remediation_developer)

Affected packages (1)

Vulnerable version ranges and first patched releases as published by GitHub.

Ecosystem Package Vulnerable range First patched Vulnerable functions
go github.com/QuantumNous/new-api < 0.9.6 0.9.6

References

cvelogic Threat Intelligence