Summary
Nango's orchestrator API can pass a crafted task group key into a PostgreSQL NOTIFY statement without safely separating data from SQL syntax. An unauthenticated attacker who can reach the affected endpoint may be able to execute arbitrary SQL against the scheduler database.
Affected context
The issue affects Nango deployments using the vulnerable orchestrator implementation, described as present before version 0.71.3. The risky path is the POST /v1/immediate endpoint, where TaskEventsHandler.notify() incorporates a task group key into a PostgreSQL NOTIFY statement. Exposure depends on whether the endpoint is reachable and the database permissions available to the application.
Exploit preconditions
- Attack surface: The Nango orchestrator API, specifically
POST /v1/immediate - Required access: The vulnerability is described as unauthenticated; network reachability to the endpoint is still required.
- Trigger point: Processing a request containing a task group key that reaches
TaskEventsHandler.notify() - Why exploitation is possible: The key is interpolated into SQL rather than handled strictly as data, allowing crafted input to alter the statement.
Why this happens
This is a SQL injection flaw mapped to CWE-89: Improper Neutralization of Special Elements used in an SQL Command. The underlying insecure pattern is building a database command by interpolating request-controlled input into SQL syntax. If input is not safely parameterized or otherwise constrained, the database may interpret part of that input as executable SQL.
Potential impact
- An attacker may execute arbitrary SQL within the scheduler database connection's permissions.
- Database records could be read, changed, or deleted, depending on those permissions.
- Scheduler data or task processing could be disrupted.
- Other services that rely on affected database records could experience consequential impact.
General mitigation guidance
Defensive patterns focus on keeping request data separate from SQL syntax:
- Use parameterized queries or database APIs that safely bind values.
- Avoid constructing SQL statements through string interpolation or concatenation.
- Validate task group keys against a narrow, explicit format when the application has such constraints.
- Apply least-privilege permissions to database accounts and limit access to sensitive scheduler data.
- Restrict network exposure of orchestrator endpoints and require authentication where appropriate.
How teams detect issues like this
- Use static analysis to identify SQL statements assembled through string interpolation or concatenation, especially when values originate from API requests.
- Review database access code paths from
POST /v1/immediatethroughTaskEventsHandler.notify(). - Monitor database and application logs for unexpected SQL errors, unusual
NOTIFYactivity, or anomalous scheduler database changes. - Enforce code-review and CI policies requiring parameterized database operations for request-derived values.

