GHSA-f35r-v9x5-r8mc

Suggest an improvement
Source
https://github.com/advisories/GHSA-f35r-v9x5-r8mc
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/03/GHSA-f35r-v9x5-r8mc/GHSA-f35r-v9x5-r8mc.json
JSON Data
https://api.test.osv.dev/v1/vulns/GHSA-f35r-v9x5-r8mc
Aliases
Published
2026-03-23T20:30:57Z
Modified
2026-03-26T21:11:33Z
Severity
  • 6.5 (Medium) CVSS_V3 - CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N CVSS Calculator
Summary
New API: IDOR in VideoProxy allows cross-user video content access via missing ownership check
Details

Summary

The video proxy endpoint GET /v1/videos/:task_id/content is vulnerable to an Insecure Direct Object Reference (IDOR). Any authenticated user who knows another user's task_id can retrieve that user's generated video content because the handler queries tasks by task_id alone and does not verify ownership.

Affected Component

  • Endpoint: GET /v1/videos/:task_id/content
  • Route middleware: TokenOrUserAuth()
  • Vulnerable handler: controller.VideoProxy

Details

VideoProxy fetches the task with:

task, exists, err := model.GetByOnlyTaskId(taskID)

GetByOnlyTaskId performs a database lookup using only task_id:

err = DB.Where("task_id = ?", taskId).First(&task).Error

The authenticated user's ID is available in request context, but VideoProxy does not use it. This allows any authenticated user to request /v1/videos/<foreign_task_id>/content and access another user's video if they know a valid task ID.

Other task-fetch paths already enforce ownership correctly via:

model.GetByTaskId(userId, taskId)

Impact

An authenticated attacker who knows another user's task_id can:

  • Download video content belonging to another user
  • Bypass tenant isolation for generated media assets
  • Cause the server to fetch upstream video content for a task the attacker does not own

For Gemini tasks, the proxy also uses task.PrivateData.Key when contacting the upstream provider. In addition, full upstream response headers are forwarded back to the requester.

Proof of Concept

curl -o stolen_video.mp4 \
  "https://<instance>/v1/videos/<victim_task_id>/content" \
  -H "Authorization: Bearer sk-<attacker_token>"

Expected result:

  • Response returns 200 OK
  • Response body contains the victim's video content

Recommended Fix

Replace the task lookup in VideoProxy with an ownership-checked query:

userId := c.GetInt("id")
task, exists, err := model.GetByTaskId(userId, taskID)
Database specific
{
    "cwe_ids": [
        "CWE-639"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2026-03-23T20:30:57Z",
    "nvd_published_at": "2026-03-23T20:16:25Z",
    "severity": "MODERATE"
}
References

Affected packages

Go / github.com/QuantumNous/new-api

Package

Name
github.com/QuantumNous/new-api
View open source insights on deps.dev
Purl
pkg:golang/github.com/QuantumNous/new-api

Affected ranges

Type
SEMVER
Events
Introduced
0 Unknown introduced version / All previous versions are affected
Fixed
0.11.4-alpha.2

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/03/GHSA-f35r-v9x5-r8mc/GHSA-f35r-v9x5-r8mc.json"