Am I affected?

type your ash_sqlite version to check

Description

Improper Neutralization of Special Elements in Data Query Logic vulnerability in ash-project ash_sqlite allows an attacker who controls a get_path/2 segment to traverse into nested JSON the application never exposed, disclosing private or sensitive? embedded fields.

AshSqlite.SqlImplementation builds the SQLite json_extract path with "$." <> Enum.join(right, "."), so a single segment containing ., [, ], or $ re-interprets the JSON path (for example "private.secret" descends two levels instead of naming one key). The path is bound as a parameter, so this is confined to the JSON-path grammar rather than SQL. Any endpoint that lets user input reach a get_path segment (a common pick-a-field pattern) can read nested values it never meant to expose.

This issue affects ash_sqlite: from 0.1.2-rc.0 before 0.2.18.

Weaknesses & attack patterns

Weakness

CWE-943 · Improper Neutralization of Special Elements in Data Query Logic in catalog → MITRE ↗

Attack patterns

CAPEC-676 · NoSQL Injection MITRE ↗

Affected — Hex / ash_sqlite Hex.pm ↗ Repository ↗

≥ 0.1.2-rc.0 < 0.2.18 affected
every other version: unaffected
cpe cpe:2.3:a:ash-project:ash_sqlite:*:*:*:*:*:*:*:*
version type semver
modules · source files · routines
modules 'Elixir.AshSqlite.SqlImplementation'
source files lib/sql_implementation.ex
routines 'Elixir.AshSqlite.SqlImplementation':do_get_path/6

Affected — GitHub / ash-project/ash_sqlite Repository ↗

≥ c12be48 < 2138480 affected
every other version: unaffected
cpe cpe:2.3:a:ash-project:ash_sqlite:*:*:*:*:*:*:*:*
version type git
modules · source files · routines
modules 'Elixir.AshSqlite.SqlImplementation'
source files lib/sql_implementation.ex
routines 'Elixir.AshSqlite.SqlImplementation':do_get_path/6

Configurations

An application must let untrusted input reach a get_path/2 path segment over a JSON/map column (for example a public calculation or filter argument that selects a key).

References

Credits

Peter Ullrich Finder Reporter
Jonatan Männchen / EEF Coordinator
Zach Daniel / Ash Project Remediation developer

CVSS breakdown

CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N

Exploitability

Attack Vector
Local
Attack Complexity
Low
Attack Requirements
Present
Privileges Required
None
User Interaction
None

Vulnerable System

Confidentiality
Low
Integrity
None
Availability
None

Subsequent Systems

Confidentiality
None
Integrity
None
Availability
None
« All CVEs