Skip to content

fix: the delete_viewport endpoint calls check_viewpo... in viewports.py - #4

Open
anupamme wants to merge 1 commit into
ucam-eo:mainfrom
anupamme:fix-repo-tee-v-002-viewport-owner-auth-bypass
Open

fix: the delete_viewport endpoint calls check_viewpo... in viewports.py#4
anupamme wants to merge 1 commit into
ucam-eo:mainfrom
anupamme:fix-repo-tee-v-002-viewport-owner-auth-bypass

Conversation

@anupamme

@anupamme anupamme commented Aug 5, 2026

Copy link
Copy Markdown

Summary

Fix high severity security issue in api/views/viewports.py.

Vulnerability

Field Value
ID V-002
Severity HIGH
Scanner multi_agent_ai
Rule V-002
File api/views/viewports.py:280
Assessment Likely exploitable

Description: The delete_viewport endpoint calls check_viewport_owner() which has a critical flaw: if a viewport does not have a _config.json file (legacy viewports), the function returns (True, None), allowing ANY user to delete it. This creates an authorization bypass for viewports created before the config file system was implemented.

Evidence

Exploitation scenario: An attacker discovers the name of a legacy viewport (one without a _config.json file) by enumerating viewport names or through information disclosure.

Scanner confirmation: multi_agent_ai rule V-002 flagged this pattern.

Production code: This file is in the production codebase, not test-only code.

Threat Model Context

This view handler appears to be publicly accessible. This is a web service - vulnerabilities in request handlers are directly exploitable by remote attackers.

Changes

  • api/helpers.py

Behavior Preservation

The change is scoped to 1 file on the vulnerable path; it only tightens handling of untrusted input and leaves valid inputs unaffected.


Automated security fix by OrbisAI Security

Automated security fix generated by OrbisAI Security
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant