Skip to content

[Security][Medium] CorsLayer::permissive() on control-plane API #48

@tembo

Description

@tembo

Severity: Medium
Area: API — CORS

Location

api/src/main.rs:78

Problem

The API mounts CorsLayer::permissive(), which reflects any origin and allows credentials/headers, on a control-plane API.

Why it matters

It's safe today only because /internal routes require an Authorization: Bearer header (not a cookie, so browsers can't auto-attach it cross-site). Shipping Access-Control-Allow-Origin: * on a control-plane API is needlessly broad and becomes exploitable the moment any cookie/ambient auth is added.

Suggested fix

Restrict CORS to the known web origin, or drop the CORS layer entirely for an internal-only API.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingsecuritySecurity vulnerability or hardeningseverity: mediumMedium severity

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions