api-mongo-agg-facet-bypass
Warn
Audited by Gen Agent Trust Hub on Sep 20, 2026
Risk Level: MEDIUMDATA_EXFILTRATIONCOMMAND_EXECUTIONINDIRECT_PROMPT_INJECTION
Full Analysis
- [DATA_EXFILTRATION]: The skill provides structured methodologies and JSON payload templates specifically designed to exfiltrate sensitive secrets, including invite tokens, credentials, password hashes, session documents, and API keys from sibling MongoDB collections.
- [COMMAND_EXECUTION]: The instructions describe a technique to bypass server-side allowlists by nesting restricted MongoDB aggregation stages (such as
$unionWithand$lookup) inside a permitted$facetstage, effectively executing unauthorized queries against the database. - [INDIRECT_PROMPT_INJECTION]: The skill identifies a vulnerability surface where an API processes untrusted, user-supplied
pipelinedata, which can be manipulated to bypass security constraints. - Ingestion points: The
pipelineparameter in API search endpoints (described in SKILL.md). - Boundary markers: The analysis notes that allowlists typically only check top-level keys, failing to secure nested sub-pipelines.
- Capability inventory: The skill enables the agent to perform cross-collection reads and brute-force collection names to locate sensitive data.
- Sanitization: The skill highlights the lack of recursive validation in the target application's stage allowlist.
Audit Metadata