Send it ciphertext, it sends back plaintext. The role check passes and nothing verifies the data is yours, so one allowed account can read another context's secrets.
What goes wrong
This is a decryption oracle wearing an authorization badge. The endpoint takes encrypted attributes from the caller, decrypts them, and returns the plaintext. There is a role check, and that is the whole gate. Nothing confirms the ciphertext belongs to the caller's tenant or was encrypted for their context.
Collect ciphertext from anywhere in the system, a log line or another tenant's record, and hand it to this endpoint. If you hold the role, you get the cleartext back. The crypto is doing exactly what it was told. The mistake is treating "can call decrypt" as "may read this particular secret." Those are different questions, and only one of them is being asked.
The pattern
@RequireRole("reader")
function decrypt(encryptedAttributes):
// role is the only gate
// ciphertext accepted from the caller
// no ownership or tenant check
return cryptoService.decrypt(encryptedAttributes)@RequireRole("reader")
function decrypt(recordId):
record = store.load(recordId)
if (record.tenant != caller.tenant):
return FORBIDDEN
if (!record.readableBy(caller)):
return FORBIDDEN
return cryptoService.decrypt(record.ciphertext)Grounding and reachability were confirmed. The exploit-path gate would not conclude without the calling code, so the finding was held and an evidence request was raised instead of being reported as fact.
Why it matters to you
Any endpoint that turns ciphertext into plaintext is a target. If it accepts arbitrary input and checks only a role, it will decrypt data the caller was never meant to see the moment they get the bytes. In a multi-tenant system that is a cross-tenant read. Authorize the record, not the operation, and stop accepting loose ciphertext when a reference to owned data does the job.
Check your own code
- Find decrypt endpoints that accept raw ciphertext as a parameter.
- Confirm each one authorizes the specific record or context, rather than only a role.
- Prefer passing an owned identifier the server resolves over passing ciphertext.
- Test cross-tenant: encrypt as one tenant, try to decrypt as another, expect a refusal.