CVE-2026-9306: Unauthenticated Insecure Direct Object Reference (IDOR) in QuantumNous new-api Midjourney Relay
Vulnerability ID: CVE-2026-9306
CVSS Score: 6.3
Published: 2026-05-23
CVE-2026-9306 is a critical unauthenticated Insecure Direct Object Reference (IDOR) vulnerability located in the QuantumNous new-api application, affecting versions up to and including 0.12.1. The flaw is caused by improper middleware ordering combined with a lack of object-level authorization checks. This allows remote, unauthenticated attackers to retrieve sensitive Midjourney images belonging to other users by supplying a valid task identifier.
TL;DR
An architectural flaw in QuantumNous new-api <= 0.12.1 allows unauthenticated attackers to bypass authorization and extract user-generated Midjourney images via the /mj/image/:id endpoint using a valid task ID.
⚠️ Exploit Status: WEAPONIZED
Technical Details
- CWE ID: CWE-639
- Attack Vector: Network
- CVSS 4.0: 6.3
- Authentication: None Required
- Impact: Data Exfiltration (Low Confidentiality)
- Exploit Status: Weaponized PoC Available
- KEV Status: Not Listed
Affected Systems
- QuantumNous new-api
- new-api: <= 0.12.1
Exploit Details
- GitHub Gist: Technical Advisory & PoC
Mitigation Strategies
- Manual code modification to fix middleware ordering
- Manual code modification to enforce user scoping in database queries
- Deployment of Web Application Firewall (WAF) rules to enforce authentication headers
Remediation Steps:
- Open
router/relay-router.goin the repository source. - Locate the line
relayMjRouter.GET("/image/:id", relay.RelayMidjourneyImage). - Move this line below the
relayMjRouter.Use(middleware.TokenAuth(), middleware.Distribute())declaration. - Open
relay/mjproxy_handler.goand locate the data retrieval call. - Modify the call from
model.GetByOnlyMJId(taskId)tomodel.GetByMJId(userId, taskId), ensuring theuserIdis extracted from the authenticated Gin context. - Recompile the application and restart the service.
References
Read the full report for CVE-2026-9306 on our website for more details including interactive diagrams and full exploit analysis.
Top comments (0)