$executeRawUnsafe

javascript · standard library
sink✓ Reviewed · 2026-09-04
RoleSink
WeaknessCWE-89
WatchesArgument[0]
Kindsql-injection
Confidencemedium
Corroboration2

Executes raw database text by design; caller input can cross directly into query syntax.

Argument map · what each slot does

The pack does not provide a callable signature for this record; the watched access path is shown directly.

ArgAccess pathPurposeWatched
Argument[0]Argument[0]The access path Atropos marks for this model.▲ sink
The weakness
CWE-89
Weakness mapping

See the linked MITRE definition for the current weakness description.

What goes wrong
Attacker's-eye view · sql-injection

Quotes, operators, or comments in a crafted value alter the query's meaning.

// modeled boundary: Argument[0] $executeRawUnsafe(attacker_influenced_value);
To decide if this call is a bug, check
1Use prepared statements and bound parameters.
2Keep identifiers and clauses allow-listed.
3Review raw-query escape hatches separately.
These checks require the surrounding codebase. The model names the boundary; it does not decide reachability or prove that a guard dominates every path.
Is this a bug in your code?Atropos stops here — by design

Atropos identifies Argument[0] as a sql-injection sink. It cannot see whether untrusted data reaches this call in your repository.

Lachesis is the codebase-level step: it traces reachability and guards for this symbol.

Check this symbol in Lachesis
Reviewed guidance

Safer direction: Prefer the parameterized API and isolate unavoidable raw fragments behind an allow-list.

Unsafe shape
db.$executeRawUnsafe('DELETE FROM logs WHERE id=' + id);
Safer shape
db.$executeRaw`DELETE FROM logs WHERE id=${id}`;
The family · sql-injection
Model facts · verbatim from the pack
RoleKindAccess pathModel IDConfidence
sinksql-injectionArgument[0]javascript.std.executerawunsafe.a0medium · corrob. 2
Referencescheatsheetseries.owasp.org