Full Report
CVE-2026-77846, a newly disclosed AshSqlite vulnerability, can allow attackers to access hidden or sensitive fields stored inside JSON and map columns when applications pass untrusted input to AshSqlite's get_path/2 functionality. The Erlang Ecosystem Foundation's CNA issued the vulnerability entry on August 30, 2026. The issue affects AshSqlite, the SQLite data layer used by the Ash Framework. Although it involves database queries, CVE-2026-77846 is not SQL injection. Instead, the AshSqlite vulnerability results from unsafe construction of JSON paths and the way SQLite interprets special characters in those paths. How the CVE-2026-77846 AshSqlite Vulnerability Works In affected releases, AshSqlite generated JSON paths using $."-style path construction through the expression: path = "$." <> Enum.join(right, ".") The individual path segments were neither escaped nor quoted. Consequently, a key intended to represent the literal name private.secret could instead be interpreted as two JSON levels. Characters such as ., [, ], and $ could similarly alter JSONPath interpretation. The GitHub advisory describes the flaw as “JSONPath injection in AshSqlite.SqlImplementation get_path”, stating that an attacker controlling a get_path/2 segment can traverse nested JSON and disclose private fields. The affected package is ash_sqlite, with versions 0.1.2-rc.0 through before 0.2.18 affected and 0.2.18 listed as the patched release. The flaw remains separate from SQL injection because the generated JSON path is supplied to SQLite's json_extract as a bound expression parameter. The attacker manipulates the JSONPath grammar, rather than injecting SQL commands. What CVE-2026-77846 Can Expose? The AshSqlite vulnerability becomes relevant when an application permits untrusted input to reach get_path/2, such as through a public calculation, filter, or API that lets callers select JSON fields. A normal endpoint might permit a caller to request a top-level title field. However, supplying private.secret can cause AshSqlite to generate $.private.secret, allowing traversal into a nested object that the API was never intended to expose. Malformed input, such as an unbalanced bracket or bare $, can also produce SQLite JSON path errors that reveal information about the underlying structure. The published proof of concept used AshSqlite 0.2.17, Bandit, and Req. It created a JSON record containing {"title":"hello","private":{"secret":"s3cr3t-api-key-9f2c"}}. A benign key=title request returned hello, while key=private.secret returned s3cr3t-api-key-9f2c. Captured SQL showed json_extract(p0."data", ?) with the parameter $.private.secret, confirming the traversal. The PoC concluded that a single attacker-controlled path segment could leak a nested value through an endpoint designed to expose only top-level keys. Fixes and Administrator Actions for CVE-2026-77846 The fix replaces the unsafe path joining with encoding that represents keys safely, escapes backslashes and quotes, and handles numeric array indexes separately. Administrators should upgrade to AshSqlite 0.2.18 or later and audit applications that accept network-controlled field-selection input. Until upgrades are completed, applications should restrict dynamic get_path/2 calls to predefined names, reject dangerous path characters such as periods and brackets, and avoid exposing arbitrary JSON paths. After upgrading, dependency locks and deployment images should be checked for older ash_sqlite versions. Logs should also be reviewed for unusual dots, brackets, or JSONPath symbols in field-selection requests. Such requests do not prove exploitation, but can help identify systems requiring investigation. The practical risk of CVE-2026-77846 depends on application architecture. Internal applications without untrusted callers face lower exposure, while public search, filtering, and field-selection APIs require careful validation and access controls.
Analysis Summary
# Vulnerability: JSONPath Injection in AshSqlite `get_path/2`
## CVE Details
- **CVE ID:** CVE-2026-77846
- **CVSS Score:** Not explicitly listed in text (Severity: High based on data disclosure potential)
- **CWE:** JSONPath Injection
## Affected Systems
- **Products:** `ash_sqlite` (The SQLite data layer for the Ash Framework)
- **Versions:** 0.1.2-rc.0 through versions prior to 0.2.18
- **Configurations:** Applications that pass untrusted user input directly to AshSqlite’s `get_path/2` functionality (e.g., through public calculations, filters, or field-selection APIs).
## Vulnerability Description
The vulnerability arises from the unsafe construction of JSON paths within the `AshSqlite.SqlImplementation.get_path` function. In affected versions, JSON paths were generated by joining segments using a `$."-style` string concatenation: `path = "$." <> Enum.join(right, ".")`.
Because individual path segments were neither escaped nor quoted, special characters such as dots (`.`), brackets (`[` / `]`), and dollar signs (`$`) could be used to manipulate the JSONPath grammar. This allows an attacker to "break out" of a designated JSON field and traverse into nested or hidden fields that were not intended for exposure. Notably, this is **not** a SQL injection, as the generated path is passed to SQLite's `json_extract` as a bound parameter; rather, it is an injection into the JSONPath logic itself.
## Exploitation
- **Status:** PoC available.
- **Complexity:** Low (requires simple character manipulation like `private.secret`).
- **Attack Vector:** Network (via API parameters/input fields).
## Impact
- **Confidentiality:** High (Ability to disclose sensitive/private fields stored in JSON/Map columns).
- **Integrity:** None.
- **Availability:** Low (Malformed input can cause SQLite JSON path errors, potentially leading to application errors).
## Remediation
### Patches
- **Upgrade to AshSqlite version 0.2.18 or later.** This version introduces proper encoding for keys, escapes backslashes/quotes, and handles numeric array indexes safely.
### Workarounds
- **Input Validation:** Restrict dynamic `get_path/2` calls to a whitelist of predefined field names.
- **Character Filtering:** Reject any input containing periods (`.`), brackets (`[` or `]`), or dollar signs (`$`).
- **API Design:** Avoid exposing arbitrary JSON path selection to untrusted users.
## Detection
- **Indicators of Compromise:** Review application logs for field-selection requests containing unusual JSONPath symbols, specifically dots or brackets in fields where a simple key name is expected.
- **Dependency Auditing:** Check `mix.lock` files and deployment images for vulnerable versions of `ash_sqlite` (versions < 0.2.18).
## References
- **Vendor Advisory:** GitHub Advisory for `ash_sqlite` (JSONPath injection in `AshSqlite.SqlImplementation.get_path`)
- **CNA:** Erlang Ecosystem Foundation
- **Defanged URL:** hxxps[://]thecyberexpress[.]com/cve-2026-77846-ashsqlite-vulnerability/