← Back to all fieldnotes

Payroll Search Must Respect Permissions

Last updated:

LLM09:2026 — Vector and Embedding Weaknesses

Relevant does not mean authorized. Embeddings are not encryption.

Embeddings are numerical vectors representing properties of source data. The two examples below examine different weaknesses in the same broader retrieval ecosystem, not two unrelated technologies.

Both are hypothetical educational scenarios, not reports of an incident or claims about a particular salary portal.

Example 1: Another employee’s payslip

A salary portal has an AI assistant using vector search over payroll documents. An employee asks, “Explain my salary breakdown.” The retrieval system selects another employee’s payslip because it is relevant and fails to enforce employee-level permissions.

The embedding has not necessarily malfunctioned. The surrounding retrieval layer has failed to enforce authorization. Without vector retrieval, a similar exposure would still be an access-control flaw; its occurrence in the vector retrieval pipeline makes it an example of this category.

Enforce verified requester identity and current employee and tenant entitlements on every retrieved chunk before exposing content to the model. Keep caches and stored results scoped to authorized users and ensure permission revocations propagate. Test cross-user and cross-tenant access using synthetic records.

Example 2: Reconstructing text from exposed embeddings

An attacker obtains embeddings created from confidential payroll documents. Under some conditions, embedding-inversion techniques may recover portions of the source text without direct access to the original documents.

This does not imply that any embedding can be decoded into an exact salary or a complete payslip. Recovery depends on the embedding model, source data, attack technique, and attacker capabilities. This is a hypothetical application of the documented inversion risk, not a demonstrated payroll exploit.

Treat embeddings as potentially sensitive derived data. Restrict access and export, protect storage and transport, minimize sensitive content embedded, and assess reconstruction risks for the actual model and data. Encryption at rest does not protect embeddings after an authorized service or attacker obtains readable vectors.

Scope

These examples cover unauthorized retrieval and embedding inversion. They do not claim complete coverage of every risk or mitigation in the OWASP category.

References