CVE-2023-7161

7.3 HIGH

📋 TL;DR

This critical SQL injection vulnerability in Netentsec NS-ASG Application Security Gateway allows remote attackers to execute arbitrary SQL commands through the login component. Organizations using affected versions of this security gateway are at risk of data breaches and system compromise.

💻 Affected Systems

Products:
  • Netentsec NS-ASG Application Security Gateway
Versions: 6.3.1
Operating Systems: Unknown - likely proprietary appliance OS
Default Config Vulnerable: ⚠️ Yes
Notes: Affects the login component at index.php?para=index via check_VirtualSiteId parameter manipulation

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete system compromise, data exfiltration, privilege escalation, and potential lateral movement within the network

🟠

Likely Case

Unauthorized access to sensitive data, authentication bypass, and potential administrative control of the security gateway

🟢

If Mitigated

Limited impact with proper input validation and database permissions, though SQL injection attempts would still be logged

🌐 Internet-Facing: HIGH - The vulnerability is remotely exploitable and affects a security gateway that's typically internet-facing
🏢 Internal Only: MEDIUM - Internal attackers could exploit this if they have network access to the gateway

🎯 Exploit Status

Public PoC: ⚠️ Yes
Weaponized: LIKELY
Unauthenticated Exploit: ⚠️ Yes
Complexity: LOW

Exploit details are publicly available on GitHub, making this easily weaponizable by attackers

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Unknown

Vendor Advisory: Unknown - no vendor advisory found in provided references

Restart Required: No

Instructions:

Check Netentsec official website for security updates. If patch is available, download and apply according to vendor instructions.

🔧 Temporary Workarounds

Web Application Firewall Rules

all

Implement WAF rules to block SQL injection patterns targeting the vulnerable parameter

WAF-specific rules to block SQL injection patterns in check_VirtualSiteId parameter

Input Validation Filter

all

Add input validation to sanitize check_VirtualSiteId parameter before processing

Implement parameter validation in application code or via reverse proxy

🧯 If You Can't Patch

  • Isolate the NS-ASG gateway from internet access and restrict internal access to authorized users only
  • Implement network segmentation and monitor all traffic to/from the vulnerable gateway for SQL injection patterns

🔍 How to Verify

Check if Vulnerable:

Test the login endpoint with SQL injection payloads in check_VirtualSiteId parameter and monitor for unexpected database responses

Check Version:

Check gateway web interface or CLI for version information (specific command unknown for this appliance)

Verify Fix Applied:

Test with the same SQL injection payloads after applying fixes - should receive proper error handling or rejection

📡 Detection & Monitoring

Log Indicators:

  • Unusual SQL queries in application logs
  • Multiple failed login attempts with SQL-like patterns in parameters
  • Database error messages in web logs

Network Indicators:

  • HTTP requests containing SQL keywords in check_VirtualSiteId parameter
  • Unusual outbound database connections from the gateway

SIEM Query:

web.url:*index.php?para=index* AND (web.param:*check_VirtualSiteId* AND (web.param:*SELECT* OR web.param:*UNION* OR web.param:*OR*))

🔗 References

📤 Share & Export