GHSA-r8cr-4f9w-7r75

Suggest an improvement
Source
https://github.com/advisories/GHSA-r8cr-4f9w-7r75
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/09/GHSA-r8cr-4f9w-7r75/GHSA-r8cr-4f9w-7r75.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-r8cr-4f9w-7r75
Aliases
Published
2026-09-15T19:48:49Z
Modified
2026-09-15T20:00:39Z
Severity
  • 5.3 (Medium) CVSS_V4 - CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N CVSS Calculator
Summary
Netmaker has a boolean‑based SQL Injection
Details

SQL Injection in Netmaker SQLite Database Backend

Summary

The sqliteDeleteRecord function in Netmaker's database layer constructs SQL DELETE statements using direct string concatenation of user-supplied input. This allows an authenticated attacker to perform boolean-based SQL injection.


Details

The endpoint:

DELETE /api/dns/{network}/{domain}

passes user-controlled path parameters through the following flow:

logic.DeleteDNS → database.DeleteRecord → sqliteDeleteRecord

Depending on the configured database backend, the request eventually reaches the SQLite database implementation.

Vulnerable Code

The SQL query is constructed using direct string concatenation without parameterization.

// database/sqlite.go
deleteSQL := "DELETE FROM " + tableName + " WHERE key = \"" + key + "\""

The key value originates from user input ({domain} path parameter) and is embedded directly into the SQL query.

Exploitation

An authenticated attacker can inject SQL operators into the {domain} path parameter to manipulate the query logic.

Because this injection is boolean-based, attackers extract data indirectly by observing the outcome of the operation:

If the injected condition evaluates true, the DNS record is deleted.

If the condition evaluates false, the DNS record remains.

By repeating this process, an attacker can infer information such as:

Database table names

Column names

Column values

Value lengths

Impact

An authenticated attacker can exploit this vulnerability to extract data from arbitrary database tables when using the SQLite backend.

Unaffected backend:

PostgreSQL (uses parameterised queries with $1, $2 placeholders)

Patches

This vulnerability is fixed in version (fill in).

The patch replaces string concatenation with parameterised SQL queries for all user-supplied values in database operations.


---
Credit

Artem Danilov
(Positive Technologies)

Daniil Satyaev (Independent)
Database specific
{
    "cwe_ids":  [
        "CWE-89"
    ],
    "github_reviewed":  true,
    "github_reviewed_at":  "2026-09-15T19:48:49Z",
    "nvd_published_at":  null,
    "severity":  "MODERATE"
}
References

Affected packages

Go / github.com/gravitl/netmaker

Package

Name
github.com/gravitl/netmaker
View open source insights on deps.dev
Purl
pkg:golang/github.com/gravitl/netmaker

Affected ranges

Type
SEMVER
Events
Introduced
0 Unknown introduced version / All previous versions are affected
Fixed
1.5.0

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/09/GHSA-r8cr-4f9w-7r75/GHSA-r8cr-4f9w-7r75.json"