Skip to content
Access control Write-up Intermediate

How I Found a Critical Unauthenticated LLM Prompt Editor in AI Infrastructure

An internal AI chatbot's prompt editor and API were exposed without authentication, letting anyone read and overwrite the base prompts used across all tenants. An attacker could change the AI's instructions for every customer conversation and export the full prompt configuration.

0xzyo Follow

Published on 0xzyo.medium.com

When I hunt, I follow one rule: avoid the obvious. Everyone tests www.REDACTEDCOMPANYNAME.com or api.REDACTEDCOMPANYNAME.com.

Ziad (Zierax), on 0xzyo.medium.com

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the prompt management routes and the chat frontend lacked any authentication dependency, and the X-Tenant header was trusted as the only tenant boundary without being tied to an authenticated identity.

Impact

An attacker could silently rewrite the AI's instructions for every tenant, potentially steering customers to attacker links, skewing recommendations or leaking business logic, though the report notes the issue had already been reported three days earlier.

What the attacker needed

Network access to the internal host; no account needed

The fix

The prompt and chat routes should require an authenticated user dependency, and the tenant header should be validated against that identity rather than trusted as received.

How it was found

  1. Find an internal-looking non-production hostname through internet-wide scanning.
  2. Fetch the OpenAPI specification from the docs path to map the API.
  3. Open the chat page and see the prompt editor load without any login.
  4. Edit a base prompt and save it, then refresh to confirm the change persisted.
  5. Read prompts and export the full prompt configuration using only the tenant header.
  6. Call the ingestion endpoint without authentication.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

A company built an AI chatbot and kept its instructions (the 'prompts' that tell the AI how to behave) in a web tool. That tool had no login check, so anyone who found the address could open it, read the instructions and change them. Because the same instructions were shared by every customer, one change would affect everyone using the chatbot.

What is Access control?

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.

More by 0xzyo

View all

2 more disclosed reports, best first.

Similar reports

View all

Same bug class and techniques, clearest first.

Broken access control

The lesson behind this report.

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.