☠️
EXFILTRATING
DATA...
01010111 10110010 00101001 11000110 01101100 10011011 00010001 11100101 01000010 10101111
[ <-- BACK_TO_SEARCH ]
Zkteco logo [ WEBSITE ] [ VENDOR STATS ]
CVSS: 7.5 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N 🐛 CWE-89
👁️
Common Weakness Enumeration - Identifies the specific category of software weakness or flaw.

CVE-2023-3942

CVE-2023-3942 SQL Injection in Zkteco
📅 PUBLISHED: 2024-05-21 12:23 UTC 🔄 UPDATED: 2026-08-12 09:02 UTC
[ ZERO-DAY / UNPATCHED ] [ DEFENSE PATCH ↓ ]
💣 PoC: Public
👁️
Proof of Concept - Indicates if functional exploit code is publicly available, drastically increasing the risk of immediate attacks.
🎯 EPSS: 0.17%
👁️
0.17% probability
4.3× above the median CVE
Tier: ELEVATED
30-day exploitation window · FIRST.org · updated daily
🥷 MITRE: T1190
👁️
MITRE ATT&CK Tactic - Describes the strategy hackers use to execute this attack.
Country: China License: Commercial
VULNERABLE: ZAM170-NF-1.8.25-7354-Ver1.0.0 (and possibly other firmware versions)
CVSS VECTOR BREAKDOWN 7.5
AV: N Attack Vector Network
AC: L Attack Complexity Low
PR: N Privileges Required None
UI: N User Interaction None
S: U Scope Unchanged
C: H Confidentiality High
I: N Integrity None
A: N Availability None
7.5
THREAT LEVEL
■ tracking this CVE ✓ independent patch confirmation ⧗ same-origin mirror (GHSA) ⚠ active exploitation verification policy →

Executive Summary

CVE-2023-3942 is a critical SQL Injection vulnerability affecting ZKTeco-based OEM devices, including the ZKTeco ProFace X, Smartec ST-FR043, and Smartec ST-FR041ME. The vulnerability stems from improper neutralization of special elements used in SQL commands, allowing an unauthenticated attacker to potentially impersonate users, perform unauthorized actions, or access sensitive user data and system parameters from the database. With a CVSS score of 7.5, this vulnerability poses a significant risk to organizations using these devices for access control and identity management. No public proof-of-concept (PoC) or patch is currently available, making detection and mitigation critical.

⚡ AUTOMATE YOUR CVE INTELLIGENCE

This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.

›Patch confidence — UNVERIFIED to CONFIRMED, cross-referenced NVD + RHSA + Debian
›Exploit & PoC — poc_status, poc_url, has_exploit. Not in NVD.
›Shodan dorks — ready-made queries to find exposed vulnerable systems
›Detection rules — YARA · Wazuh · Elastic (all plans) · Sigma (Pro)
›pending_fields — know exactly which of 7 fields NVD hasn't processed yet
›Free backfill — data incomplete when you paid? Re-check within 30 days = 0 credits
PAYG €0.08/lookup Standard €19/mo (was €29) · 5k credits Pro €65/mo (was €99) · 20k credits FOUNDING PRICE · LOCKED FOR LIFE · ENDS 31 DEC 2026
[ FROM €19/MO ]
Free sandbox key available
No signup required

CVSS Breakdown & Threat Level

  • CVSS Score: 7.5 (High)
  • Attack Vector: Network (AV:N)
  • Attack Complexity: Low (AC:L)
  • Privileges Required: None (PR:N)
  • User Interaction: None (UI:N)
  • Scope: Unchanged (S:U)
  • Confidentiality Impact: High (C:H)
  • Integrity Impact: None (I:N)
  • Availability Impact: None (A:N)

The high confidentiality impact indicates that an attacker can extract sensitive data, including user credentials and system parameters, without authentication. The low attack complexity and no required privileges make this vulnerability easily exploitable over the network.

Deep Dive & Mechanics

The vulnerability exists in the SQL query handling logic of the ZKTeco-based devices' standalone service (v. 2.1.6-20200907 and possibly others). The application fails to properly sanitize user-supplied input before incorporating it into SQL queries. This allows an attacker to inject arbitrary SQL commands by crafting malicious input strings.

Attack Vector: The attacker sends specially crafted HTTP requests to the device's web interface or API endpoints that interact with the backend database. By injecting SQL commands, the attacker can manipulate the query to return unauthorized data or bypass authentication.

Impact:

  • User Impersonation: The attacker can manipulate SQL queries to bypass authentication and log in as any user.
  • Data Exfiltration: Sensitive data such as user lists, access logs, and system configuration parameters can be extracted.
  • Unauthorized Actions: The attacker may be able to modify database records, potentially altering user permissions or device settings.

Vulnerable vs. Patched Code

Since no patch is available, the vulnerable code is presumed to be in the SQL query construction logic. A typical vulnerable pattern might look like:

# Vulnerable code (pseudo)
username = request.GET['username']
query = "SELECT * FROM users WHERE username = '" + username + "'"

A patched version would use parameterized queries:

# Patched code (pseudo)
username = request.GET['username']
query = "SELECT * FROM users WHERE username = ?"
cursor.execute(query, (username,))

Without an official patch, organizations must rely on compensating controls.

Exploitation & Lab Setup

Red Team (Offensive)

Lab Setup:

  1. Deploy a ZKTeco ProFace X or Smartec ST-FR043 device in an isolated network.
  2. Ensure the device is running firmware ZAM170-NF-1.8.25-7354-Ver1.0.0.
  3. Use a tool like Burp Suite or sqlmap to test for SQL injection.

Exploitation Steps:

  1. Identify the vulnerable endpoint (e.g., /cgi-bin/accessControl.cgi or similar).
  2. Inject a SQL payload into a parameter (e.g., username):
    ' OR '1'='1' --
    
  3. Use sqlmap to automate extraction:
    sqlmap -u "http://<device_ip>/cgi-bin/accessControl.cgi?username=test" --batch --dump
    
  4. Extract user credentials and system parameters.

Note: No public exploit code is available; this is a hypothetical demonstration.

Blue Team (Defensive)

Detection:

  • Monitor for SQL injection patterns in HTTP requests (e.g., ' OR, UNION, --).
  • Enable logging on the device and centralize logs for analysis.
  • Use a Web Application Firewall (WAF) to block malicious SQL patterns.

Mitigation:

  • Isolate affected devices on a separate VLAN with strict access controls.
  • Disable unnecessary web interfaces or restrict access to trusted IPs.
  • Monitor for anomalous database queries or authentication attempts.

Indicators of Compromise (IOCs)

  • Network IOCs:

    • HTTP requests containing SQL keywords (SELECT, UNION, OR, --, #) in parameters.
    • Repeated failed authentication attempts followed by successful login.
    • Unusual outbound data transfers from the device.
  • Host IOCs:

    • Unexpected database entries or modified user permissions.
    • Device logs showing SQL errors or injection attempts.
    • Unauthorized configuration changes.
  • File IOCs:

    • Temporary files created by exploitation tools (e.g., sqlmap output files).

Detection Engineering

YARA Rule

rule CVE_2023_3942_SQLi_Attempt {
    meta:
        description = "Detects SQL injection attempts targeting ZKTeco devices"
        author = "Valters IT"
        date = "2025-04-10"
        cve = "CVE-2023-3942"
    strings:
        $sqli1 = /(\%27|')\s*(OR|or)\s*(\%27|')/
        $sqli2 = /UNION\s+SELECT/i
        $sqli3 = /--\s*$/m
        $sqli4 = /(\%23|#)/i
    condition:
        any of ($sqli*) and filesize < 10KB
}

Sigma Rule

title: SQL Injection Attempt Against ZKTeco Device
id: 7a8b9c0d-1e2f-3a4b-5c6d-7e8f9a0b1c2d
status: experimental
description: Detects SQL injection patterns in HTTP requests to ZKTeco devices
author: Valters IT
date: 2025-04-10
logsource:
    category: webserver
    product: apache
detection:
    selection:
        c-uri|contains:
            - "' OR"
            - "UNION SELECT"
            - "--"
            - "#"
    condition: selection
falsepositives:
    - Legitimate use of special characters in usernames
level: high

Suricata Rule

alert http $HOME_NET any -> $EXTERNAL_NET any (
    msg:"CVE-2023-3942 - SQL Injection Attempt on ZKTeco Device";
    flow:to_server,established;
    content:"' OR"; http_uri;
    content:"UNION"; http_uri;
    pcre:"/(\%27|')\s*(OR|or)\s*(\%27|')/i";
    sid:1000001;
    rev:1;
    reference:cve,2023-3942;
    priority:1;
)

Remediation & Mitigation

  1. Immediate Actions:

    • Isolate affected devices from the internet and untrusted networks.
    • Restrict access to the device's web interface to trusted IPs only.
    • Monitor logs for suspicious activity.
  2. Long-term Fixes:

    • Contact ZKTeco or the OEM vendor for a firmware patch.
    • If no patch is available, consider replacing the device with a patched alternative.
    • Implement a Web Application Firewall (WAF) with SQL injection rules.
  3. Compensating Controls:

    • Use network segmentation to limit exposure.
    • Enable detailed logging and alerting for SQL injection attempts.
    • Conduct regular vulnerability scans and penetration tests.

Valters IT
Senior DevSecOps & Cyber Threat Intelligence Expert

👁️ SHODAN DORKS (THREAT HUNTING)

What is this? Security researchers use these exact search queries on Shodan.io (a search engine for internet-connected devices) to find vulnerable systems globally. You can copy these dorks to see if your organization's IP space is exposed.

ZKTeco ProFace X
Smartec ST-FR043
Smartec ST-FR041ME
ZAM170-NF-1.8.25-7354

💣 PoC CODE AVAILABLE

Exploit code for this CVE is tracked in our database. Access poc_code via API Pro.

[ API_PRO ] →
◈ SOURCE Analysis & enrichment: valtersit.com/cve/CVE-2023-3942/ · CVE data: NVD/MITRE (public domain) · © 2026 ValtersIT Hub
>_ SYSTEM_CORE: INTEL_ACTIVE
90% TEAM-CURATED // 10% AUTOMATED INGESTION.
ALL PATCH REFERENCES AND VERSION DATA SOURCED FROM NVD + OSV OFFICIAL REGISTRIES.