Skip to content

Open proxy relay in valyu-proxy β€” no path allow-listΒ #34

@Hag-Zilla

Description

@Hag-Zilla
  • Context: Cloud / Both
  • Category: Vulnerability (Server-Side Request Forgery / Privilege Escalation)
  • Severity: 🟠 High

Evidence

// app/api/valyu-proxy/route.ts
const body = await request.json();
const { path, method, body: requestBody } = body;

if (!path) {
  return NextResponse.json({ error: "invalid_request", message: "Missing path parameter" }, { status: 400 });
}

const appUrl = process.env.VALYU_APP_URL || "https://platform.valyu.ai";
const proxyUrl = `${appUrl}/api/oauth/proxy`;

const response = await fetch(proxyUrl, {
  method: "POST",
  headers: { Authorization: `Bearer ${accessToken}`, ... },
  body: JSON.stringify({ path, method: method || "POST", body: requestBody }),
});

The path parameter is accepted from the request body without any validation or allow-list. An authenticated user (or any unauthenticated request if the check is bypassed via self-hosted mode) can send arbitrary path values to be forwarded to platform.valyu.ai.

Attack scenario: A user sends path: "/v1/admin/users" or path: "/v1/billing/refund" β€” any endpoint the OAuth token has scopes for. The proxy blindly forwards it with the server's own Authorization header.

Affected files: app/api/valyu-proxy/route.ts

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions