Description
ChirpStack's SQLite-backend device tag filtering (chirpstack/src/storage/device.rs, in both get_count and list) interpolates the user-supplied tag KEY directly into a raw SQL fragment via Rust's format! macro , while only the tag VALUE is safely parameter-bound via Diesel's .bind.
Published: 2026-08-05
Score: 6.5 Medium
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

ChirpStack’s SQLite backend allows authenticated users with device‑list privileges to inject arbitrary SQL by supplying a specially crafted tag key in the device filter of ListDevices. The source of the flaw is the direct interpolation of the tag key into a raw SQL string using Rust’s format!() macro while only the tag value is parameter‑bound, enabling an attacker to execute unintended SQL statements. This classic unsanitised input flaw is identified as CWE-89 and can compromise confidentiality, integrity, and potentially availability of the SQLite database.

Affected Systems

All installations of chirpstack that rely on the SQLite backend (chirpstack-sqlite package) are affected. The PostgreSQL backend remains unaffected because it uses parameterised JSONB operators instead of raw SQL. Deployments where users possess device‑list permissions and the backend is configured as SQLite are vulnerable.

Risk and Exploitability

The CVSS score of 6.5 indicates a high‑impact vulnerability, though the EPSS score of 0.00227 (~0.23%) indicates a very low likelihood of exploitation. The flaw is not listed in the CISA KEV catalog. An attacker needs authenticated access with device‑list privileges to exploit this weakness, using the tag key filter as the injection vector. Once the conditions are met, the injection is straightforward and could allow arbitrary database queries or modifications.

Generated by OpenCVE AI on August 10, 2026 at 20:59 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Install the latest ChirpStack release that corrects the raw SQL interpolation of tag keys.
  • Reconfigure the deployment to use the PostgreSQL backend instead of SQLite, eliminating the vulnerability path.
  • If an upgrade or backend change cannot be performed immediately, restrict tag key values to strictly alphanumeric patterns or temporarily disable device‑tag filtering until a patch is applied.

Generated by OpenCVE AI on August 10, 2026 at 20:59 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Mon, 10 Aug 2026 12:00:00 +0000

Type Values Removed Values Added
Description ChirpStack's SQLite-backend device tag filtering (chirpstack/src/storage/device.rs, in both get_count() and list()) interpolates the user-supplied tag KEY directly into a raw SQL fragment via Rust's format!() macro (`dsl::sql::<Bool>(&format!("device.tags->>'{}' =", k)).bind::<Text, _>(v)`), while only the tag VALUE is safely parameter-bound via Diesel's .bind(). An authenticated user with device-list access can inject SQL via a crafted tag key when the SQLite backend (chirpstack-sqlite package) is in use; the PostgreSQL backend is unaffected as it uses Diesel's native JSONB containment operator instead of raw SQL string formatting. ChirpStack's SQLite-backend device tag filtering (chirpstack/src/storage/device.rs, in both get_count and list) interpolates the user-supplied tag KEY directly into a raw SQL fragment via Rust's format! macro , while only the tag VALUE is safely parameter-bound via Diesel's .bind.
Title ChirpStack - SQLite Backend SQL Injection via Device Tag Key in ListDevices Filter ChirpStack SQLite Backend SQL Injection via Device Tag Key in ListDevices Filter

Mon, 10 Aug 2026 11:45:00 +0000

Type Values Removed Values Added
Title ChirpStack SQLite Backend SQL Injection via Device Tag Key in ListDevices Filter ChirpStack - SQLite Backend SQL Injection via Device Tag Key in ListDevices Filter

Fri, 07 Aug 2026 10:30:00 +0000

Type Values Removed Values Added
First Time appeared Chirpstack
Chirpstack chirpstack
Vendors & Products Chirpstack
Chirpstack chirpstack

Wed, 05 Aug 2026 16:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}


Wed, 05 Aug 2026 13:15:00 +0000

Type Values Removed Values Added
Description ChirpStack's SQLite-backend device tag filtering (chirpstack/src/storage/device.rs, in both get_count() and list()) interpolates the user-supplied tag KEY directly into a raw SQL fragment via Rust's format!() macro (`dsl::sql::<Bool>(&format!("device.tags->>'{}' =", k)).bind::<Text, _>(v)`), while only the tag VALUE is safely parameter-bound via Diesel's .bind(). An authenticated user with device-list access can inject SQL via a crafted tag key when the SQLite backend (chirpstack-sqlite package) is in use; the PostgreSQL backend is unaffected as it uses Diesel's native JSONB containment operator instead of raw SQL string formatting.
Title ChirpStack SQLite Backend SQL Injection via Device Tag Key in ListDevices Filter
Weaknesses CWE-89
References
Metrics cvssV3_1

{'score': 6.5, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N'}


Subscriptions

Chirpstack Chirpstack
cve-icon MITRE

Status: PUBLISHED

Assigner: TuranSec

Published:

Updated: 2026-08-10T11:47:06.627Z

Reserved: 2026-08-05T12:23:34.968Z

Link: CVE-2026-71282

cve-icon Vulnrichment

Updated: 2026-08-05T15:53:42.638Z

cve-icon NVD

Status : Received

Published: 2026-08-05T13:24:52.847

Modified: 2026-08-10T12:17:30.790

Link: CVE-2026-71282

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-08-10T21:00:04Z

Weaknesses
  • CWE-89

    Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')