CVE-2022-33128

9.1 CRITICAL

📋 TL;DR

This CVE describes a SQL injection vulnerability in the RG-EG series gateway's alarmService.php function, allowing attackers to execute arbitrary SQL commands. It affects RG-EG gateway models EG350 running EG_RGOS version 11.1(6), potentially compromising network security.

💻 Affected Systems

Products:
  • RG-EG series gateway EG350
Versions: EG_RGOS 11.1(6)
Operating Systems: EG_RGOS
Default Config Vulnerable: ⚠️ Yes
Notes: Vulnerability is in the default configuration of the specified version.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Full system compromise, data theft, or network takeover via SQL injection leading to remote code execution or administrative access.

🟠

Likely Case

Unauthorized data access, manipulation of alarm systems, or gateway configuration changes.

🟢

If Mitigated

Limited impact if input validation and network segmentation are enforced, preventing exploitation.

🌐 Internet-Facing: HIGH if the gateway is exposed to the internet, as it allows direct exploitation.
🏢 Internal Only: MEDIUM if accessible only internally, but still poses risk from insider threats or lateral movement.

🎯 Exploit Status

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

Exploitation is straightforward via crafted HTTP requests to the vulnerable endpoint.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Unknown

Vendor Advisory: No official vendor advisory found in provided references.

Restart Required: No

Instructions:

Check vendor website for updates or patches; if unavailable, apply workarounds.

🔧 Temporary Workarounds

Block Access to Vulnerable Endpoint

linux

Restrict network access to /alarm_pi/alarmService.php using firewall rules.

iptables -A INPUT -p tcp --dport 80 -m string --string '/alarm_pi/alarmService.php' --algo bm -j DROP

Input Validation via WAF

all

Deploy a web application firewall to filter SQL injection attempts.

🧯 If You Can't Patch

  • Isolate the gateway in a segmented network to limit exposure.
  • Monitor logs for unusual access patterns to the vulnerable endpoint.

🔍 How to Verify

Check if Vulnerable:

Send a crafted SQL injection payload to http://<gateway-ip>/alarm_pi/alarmService.php and check for error responses or unexpected behavior.

Check Version:

ssh admin@<gateway-ip> show version | grep EG_RGOS

Verify Fix Applied:

After applying workarounds, test the endpoint to ensure it no longer processes malicious inputs.

📡 Detection & Monitoring

Log Indicators:

  • Unusual SQL queries in gateway logs
  • Multiple failed login attempts or access to alarmService.php

Network Indicators:

  • HTTP requests with SQL keywords to the vulnerable endpoint

SIEM Query:

source="gateway_logs" AND (url="/alarm_pi/alarmService.php" AND (payload CONTAINS "' OR" OR payload CONTAINS "--"))

🔗 References

📤 Share & Export