Summary
PlaciPy 1.0.0 constructs DynamoDB queries and filters directly from user-controlled query parameters without validation or sanitization, enabling injection into backend query logic.
Under these conditions, an attacker can manipulate query behavior, potentially bypassing access controls, exfiltrating or tampering with placement-related data, and impacting the integrity and confidentiality of institutional records.
Affected context
This vulnerability appears in PlaciPy's HTTP endpoints where request query parameters are mapped into DynamoDB query and filter expressions.
It is most relevant in deployments where:
- User input is directly merged into key condition or filter expressions
- There is no centralized input validation or sanitization layer
- Backend authorization is assumed to be enforced by query-level filtering rather than explicit access checks
Any route that translates user parameters into low-level DynamoDB query structures without neutralization is potentially affected.
Exploit preconditions
- Attack surface: Network-accessible PlaciPy endpoints that accept query parameters (e.g., listing placements, students, companies, or applications).
- Required access: Ability to send crafted HTTP requests to PlaciPy (typically unauthenticated or low-privileged user access, depending on deployment).
- Trigger point: Server-side logic that interpolates or concatenates user-supplied parameters into DynamoDB
KeyConditionExpression,FilterExpression, or similar constructs. - Why exploitation is possible: The application fails to neutralize special characters, operators, or expression fragments, so attacker-controlled data can alter the structure and semantics of the query beyond its intended bounds.
Why this happens
The underlying issue is the direct use of user-controlled data in query construction without proper neutralization or structural separation.
Instead of treating incoming parameters as data values bound into parameterized expressions, the code allows them to participate in the formation of DynamoDB condition and filter expressions.
This maps to CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component, where untrusted input is incorporated into a command for another component (DynamoDB) in a way that lets an attacker inject operators, logical conditions, or arbitrary expression fragments.
Potential impact
- An attacker could bypass logical access restrictions enforced only at the query layer and retrieve records they should not see.
- An attacker could manipulate filters to expose large volumes of sensitive placement, student, or employer data.
- An attacker could craft expressions to update or delete unintended records if unsafe patterns are reused in write operations.
- An attacker could interfere with reporting or analytics by skewing query results, leading to incorrect operational decisions.
- An attacker could chain the issue with other weaknesses (e.g., missing authorization checks) to escalate impact across the system.
General mitigation guidance
Effective mitigation focuses on enforcing a strict separation between query structure and user data:
- Use parameterized or expression-attribute-based APIs for DynamoDB, ensuring all user input is bound as data (e.g.,
ExpressionAttributeValues) rather than concatenated into expression strings. - Introduce allowlisted filters and sorting options: expose only specific, predefined query operations (e.g., fixed fields and comparison operators) and reject anything outside this set.
- Normalize and validate query parameters against strict schemas, including type checks, allowed value ranges, and controlled enumerations.
- Centralize query-building logic in a small, well-reviewed module that encapsulates all interaction with DynamoDB, making unsafe patterns easier to detect and avoid.
- Apply defense-in-depth with explicit authorization checks at the application layer, decoupled from query filters, so that data access does not rely solely on injected query conditions.
How teams detect issues like this
Detection usually combines code-level and behavior-level approaches:
- Static analysis: Search for places where HTTP query parameters or request fields flow directly into
KeyConditionExpression,FilterExpression, or similar DynamoDB expression strings, especially via string concatenation or interpolation. - Code review signals: Look for hand-built query strings, ad hoc filtering logic, and any use of user input in constructing expressions instead of binding it via parameter maps.
- Security testing: Perform dynamic testing with crafted query parameters that introduce additional logical operators or unexpected values to observe whether query behaviors change in unintended ways.
- Policy enforcement: Include automated checks in CI that flag direct string construction for database or backend expressions when untrusted input is involved, and require use of approved query-building helpers.

