SonicWall SRA — 1 vulnerability check
noctis ships 1 vulnerability check for SonicWall SRA, covering 1 CVE; each one has to observe the bug on the live service before it reports a finding.
← All products · Feeds on GitHub
SonicWall SRA pre-auth SQL injection (customerTID)
| CVE | CVE-2019-7481 |
|---|---|
| Severity | high · CVSS 7.5 |
| Category | sqli — SQL injection |
| Services | https |
| Detection | http_request, script, match · highest QoD 75 |
| Feed | tests/vulnerabilities/sonicwall-sra/CVE-2019-7481.yaml |
Detects CVE-2019-7481, an unauthenticated blind SQL injection in the Virtual Assist "supportLogin" CGI of SonicWall SRA / SMA appliances. The customerTID parameter is interpolated into a SQLite query with the unsafe %s formatter (instead of %q), so an attacker can inject arbitrary SQL before authentication. Detection sends two benign boolean probes — an always-true and an always-false injected condition — and reports the vulnerability only when the server's responses differ, which can only happen when customerTID is interpolated unescaped. A patched appliance escapes the input, so both probes return the same page. No data is read or modified.
How noctis detects it
- HTTP(S) request
GET /cgi-bin/supportLogin?module=VirtualAssist&customerTID=0%27%20OR%20%271%27%3D%271 - HTTP(S) request
GET /cgi-bin/supportLogin?module=VirtualAssist&customerTID=0%27%20OR%20%271%27%3D%272 - Parses / computes the next value with a Rhai script
- Checks
sqli.injectablefor^true$→ finding QoD 75: SonicWall SRA pre-auth SQL injection (CVE-2019-7481)
References:
- https://nvd.nist.gov/vuln/detail/CVE-2019-7481
- https://psirt.global.sonicwall.com/vuln-detail/SNWLID-2019-0009
- https://blog.scrt.ch/2020/02/11/sonicwall-sra-and-sma-vulnerabilties/
- https://www.cisa.gov/known-exploited-vulnerabilities-catalog
Feed source — tests/vulnerabilities/sonicwall-sra/CVE-2019-7481.yaml
uid: b63304da-a9e2-409a-8084-ea5b20b3aef4
name: "SonicWall SRA pre-auth SQL injection (customerTID)"
description: |
Detects CVE-2019-7481, an unauthenticated blind SQL injection in the
Virtual Assist "supportLogin" CGI of SonicWall SRA / SMA appliances. The
customerTID parameter is interpolated into a SQLite query with the unsafe
%s formatter (instead of %q), so an attacker can inject arbitrary SQL
before authentication. Detection sends two benign boolean probes — an
always-true and an always-false injected condition — and reports the
vulnerability only when the server's responses differ, which can only
happen when customerTID is interpolated unescaped. A patched appliance
escapes the input, so both probes return the same page. No data is read
or modified.
cves: [CVE-2019-7481]
cvss: 7.5
severity: high
confidence_base: 0.30
tags: [sqli, sql-injection, sonicwall, sra, sma, vpn, pre-auth, kev]
category: sqli
services: [https]
author: noctis
version: "1.0.0"
references:
- "https://nvd.nist.gov/vuln/detail/CVE-2019-7481"
- "https://psirt.global.sonicwall.com/vuln-detail/SNWLID-2019-0009"
- "https://blog.scrt.ch/2020/02/11/sonicwall-sra-and-sma-vulnerabilties/"
- "https://www.cisa.gov/known-exploited-vulnerabilities-catalog"
steps:
# Always-true injected condition: 0' OR '1'='1
# -> customerTID=0%27%20OR%20%271%27%3D%271
- id: probe-true
action: http_request
method: GET
path: "/cgi-bin/supportLogin?module=VirtualAssist&customerTID=0%27%20OR%20%271%27%3D%271"
port: "{{port}}"
tls_insecure: true
timeout_secs: 10
follow_redirects: false
headers:
Connection: "close"
store_as: r_true
# Always-false injected condition: 0' OR '1'='2
# -> customerTID=0%27%20OR%20%271%27%3D%272
- id: probe-false
action: http_request
method: GET
path: "/cgi-bin/supportLogin?module=VirtualAssist&customerTID=0%27%20OR%20%271%27%3D%272"
port: "{{port}}"
tls_insecure: true
timeout_secs: 10
follow_redirects: false
headers:
Connection: "close"
store_as: r_false
# Boolean-based blind SQLi: the always-true condition yields a different
# response than the always-false one only when customerTID reaches the SQL
# query unescaped. An appliance that escapes the quote returns the same page
# for both probes, so `differs` stays false there.
- id: analyze
action: script
condition: "r_true.status == 200 && r_false.status == 200"
store_as: sqli
code: |
let tb = if type_of(r_true.body) == "string" { r_true.body } else { "" };
let fb = if type_of(r_false.body) == "string" { r_false.body } else { "" };
#{
injectable: tb != fb,
true_len: strlen(tb),
false_len: strlen(fb)
}
- id: confirm
action: match
source: sqli.injectable
pattern: "^true$"
condition: "sqli.injectable == true"
on_match:
finding:
title: "SonicWall SRA pre-auth SQL injection (CVE-2019-7481)"
description: "The customerTID parameter of /cgi-bin/supportLogin is injectable: an always-true and an always-false boolean condition produced different responses, proving the value is interpolated into the SQLite query unescaped (blind SQL injection, exploitable without authentication)."
remediation: "Upgrade SonicWall SMA/SRA to a fixed firmware (SMA 100 series 9.0.0.3 / 8.x fixed builds; SRA builds per SNWLID-2019-0009) and disable the Virtual Assist module if unused."
confidence_delta: 0.45
qod: 75
evidence: "Boolean-based blind SQLi on /cgi-bin/supportLogin customerTID: always-true probe returned a {{sqli.true_len}}-byte response, always-false probe {{sqli.false_len}}-byte — differential proves unescaped SQL (CVE-2019-7481)"