Security research

The sibling that had the org check

Dmitry Maranik

Unstract is an open-source platform for pulling structured data out of documents with LLMs. It is multi-tenant by organization: each org has its own Prompt Studio projects, its own prompts, and its own extraction outputs. One read endpoint in Prompt Studio returned another organization's prompts and outputs to anyone who asked with the right tool id. The advisory is now public: Medium severity, CWE-639, fixed in 0.189.0.

What broke

Prompt Studio has two reads over the same data. One of them, the read that fetches the latest outputs by key, scoped its query to the caller's organization. The other, the read that fetches the default outputs for a tool, filtered by tool_id and nothing else:

The attacker needs a tool id from the other organization. Tool ids are UUIDs, so you cannot iterate them, but they are not secrets either. They sit in URLs, exports, screenshots, and support threads. That is why the advisory landed at Medium rather than High: authenticated access and a known id are required, and the read is confidentiality only.

Why the outputs matter more than the prompts

The prompts are a team's work product, which is bad enough to leak. The extraction outputs are worse. Prompt Studio is where a team tunes extraction against real documents, so the outputs are the fields pulled from those documents: names, amounts, dates, clauses, whatever the org is processing. Reading another org's default outputs is reading what their documents said.

The fix, and why it is the right shape

The obvious patch is to add the missing organization predicate to the one query. Unstract did more than that in 0.189.0, and the difference is worth describing because it is the fix we recommend every time this pattern shows up.

Fix the class, not the instance. The one-line patch closes the read you found. The manager change closes the reads nobody has written yet.

The pattern

This is the shape behind most of the cross-tenant bugs we report, which we wrote up in the roundup: a scope check that was built correctly and wired into most paths, then skipped on one read that reuses the same query. The scoped sibling is the proof that the boundary was intended. The unscoped one is the bug. When you review a multi-tenant codebase, diff the tenant predicate across every handler that touches a table, not just the handler that was in the last incident.

How the disclosure went

We reported it through GitHub's private vulnerability reporting in June. Zipstack validated it, asked how we wanted to be credited, shipped the fix in 0.189.0 in September, and published the advisory this week with the credit. That is the whole process working as designed, and it is worth saying so, because it does not always go that way.

Check your own siblings

If you run a multi-tenant app, pick a table that holds customer data and list every read against it. For each read, find the tenant predicate. If one read has it and another does not, you have found this bug before anyone else does. Then consider moving the predicate into the manager or repository layer so the next read gets it for free.

We found this one by reading source. Sectum AI is the runtime version of the same check: it provisions synthetic organizations, plants canary data in each, and verifies what every read returns across the boundary, with a signed evidence pack at the end. It is open source; point it at your own stack.

Explore the open source More research

Advisory: GHSA-c8gc-qc2m-x8jr (published 2026-11-06, Medium, CVSS 3.1 6.5, CWE-639), affects Unstract before 0.189.0, fixed in 0.189.0. No CVE assigned at the time of writing. Credited reporter: Dmitry Maranik (Sectum AI); the advisory also lists an independent co-reporter. Source-confirmed against v0.177.4 and the current main branch.