CVE-2023-47297
Executive Summary
CVE-2023-47297 is a critical settings manipulation vulnerability in NCR Terminal Handler v1.5.1. The flaw allows an attacker to modify system security auditing configurations and execute arbitrary commands, effectively bypassing security controls and compromising the integrity of the terminal environment. This vulnerability is particularly dangerous in point-of-sale (POS) and retail environments where NCR terminals are commonly deployed. No public proof-of-concept (PoC) or patch is currently available, making this a high-risk, unpatched threat.
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.
No signup required
Supply Chain & Package Security
This vulnerability is not related to NPM, PyPI, Go, or Ruby ecosystems. It affects a proprietary NCR software component (Terminal Handler v1.5.1) used in retail and financial terminal systems. Organizations should treat this as a supply chain risk from the vendor NCR.
CVSS Breakdown & Threat Level
- CVSS Score: 0.0 (No official CVSS vector assigned)
- Threat Level: Critical (based on impact: arbitrary command execution + security control bypass)
- Attack Vector: Likely network-based (local or remote depending on deployment)
- Complexity: Low (settings manipulation suggests minimal authentication or authorization checks)
- Impact: High (confidentiality, integrity, availability all at risk)
Deep Dive & Mechanics
The vulnerability resides in the settings management functionality of NCR Terminal Handler v1.5.1. The application fails to properly validate or sanitize user-supplied input when modifying configuration parameters. An attacker can craft a malicious request to alter system settings, including security auditing configurations (e.g., disabling audit logs, modifying event thresholds, or changing logging destinations). This manipulation can then be leveraged to execute arbitrary commands on the underlying operating system, likely through command injection or by modifying executable paths in the configuration.
The root cause is a lack of input validation and insufficient authorization checks in the settings API or UI. The attacker does not need to authenticate or can bypass weak authentication to exploit this.
Vulnerable vs. Patched Code
Since no patch is available, a direct code comparison is not possible. However, the vulnerable code likely resembles:
# Vulnerable pseudo-code
def update_setting(setting_name, setting_value):
# No validation or sanitization
config[setting_name] = setting_value
save_config()
# If setting_value contains shell metacharacters, command injection possible
os.system(f"apply_setting {setting_name} {setting_value}")
A patched version would include:
# Patched pseudo-code
def update_setting(setting_name, setting_value):
allowed_settings = ["audit_level", "log_retention", "timeout"]
if setting_name not in allowed_settings:
raise ValueError("Invalid setting")
# Sanitize input
setting_value = sanitize_input(setting_value)
config[setting_name] = setting_value
save_config()
# Use safe API
subprocess.run(["apply_setting", setting_name, setting_value], check=True)
Exploitation & Lab Setup
Red Team
- Reconnaissance: Identify NCR Terminal Handler v1.5.1 endpoints (e.g.,
https://target:8443/settings). - Exploit: Send a crafted POST request to modify a security setting:
POST /settings/update HTTP/1.1 Host: target:8443 Content-Type: application/json { "setting": "audit_enabled", "value": "false; cmd.exe /c whoami > C:\\temp\\output.txt" } - Command Execution: The injected command executes, allowing arbitrary code execution.
- Persistence: Modify startup settings to maintain access.
Blue Team
- Detection: Monitor for unusual POST requests to
/settings/updateor similar endpoints. - Honeypot: Deploy a fake NCR Terminal Handler instance to capture exploitation attempts.
- Network Segmentation: Isolate NCR terminals from untrusted networks.
- Logging: Enable verbose logging for all configuration changes and audit trail modifications.
Indicators of Compromise (IOCs)
- Network: Unusual HTTP POST requests to
/settings/updatewith JSON payloads containing shell commands. - File System: Modified configuration files (e.g.,
terminal_handler.conf) with unexpected values or command strings. - Process: Spawned child processes like
cmd.exe,/bin/sh, orpowershell.exefrom the Terminal Handler process. - Registry (Windows): Changes to
HKLM\SOFTWARE\NCR\TerminalHandler\Settingswith suspicious values. - Logs: Missing or truncated audit logs, or logs showing configuration changes without proper authentication.
Detection Engineering
YARA Rule
rule CVE_2023_47297_NCR_Terminal_Handler_Settings_Manipulation {
meta:
description = "Detects attempts to exploit CVE-2023-47297 in NCR Terminal Handler v1.5.1"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2023-47297"
strings:
$s1 = "/settings/update" ascii wide nocase
$s2 = "audit_enabled" ascii wide nocase
$s3 = "cmd.exe" ascii wide nocase
$s4 = "/bin/sh" ascii wide nocase
$s5 = "powershell" ascii wide nocase
condition:
any of ($s1, $s2) and any of ($s3, $s4, $s5)
}
Sigma Rule
title: CVE-2023-47297 NCR Terminal Handler Settings Manipulation
id: 8a9b3c4d-5e6f-7a8b-9c0d-1e2f3a4b5c6d
status: experimental
description: Detects exploitation attempts of CVE-2023-47297 via HTTP POST requests to /settings/update
author: Valters IT
date: 2025/04/10
logsource:
category: webserver
product: nginx
detection:
selection:
cs-method: 'POST'
cs-uri-stem: '/settings/update'
cs-content-type: 'application/json'
keywords:
- 'audit_enabled'
- 'cmd.exe'
- '/bin/sh'
- 'powershell'
condition: selection and keywords
falsepositives:
- Legitimate configuration changes by authorized administrators
level: high
Suricata Rule
alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"CVE-2023-47297 NCR Terminal Handler Settings Manipulation"; flow:to_server,established; content:"POST"; http_method; content:"/settings/update"; http_uri; content:"audit_enabled"; http_client_body; content:"cmd.exe"; http_client_body; sid:1000001; rev:1;)
Remediation & Mitigation
- Immediate: Disable remote access to NCR Terminal Handler v1.5.1 if not required. Restrict network access to trusted IPs only.
- Short-term: Implement a Web Application Firewall (WAF) rule to block POST requests to
/settings/updatewith suspicious payloads. - Long-term: Contact NCR for an official patch or upgrade to a newer version. If no patch is available, consider replacing the software.
- Compensating Controls: Enable strict input validation and sanitization at the application layer. Use application allowlisting to prevent unauthorized command execution.
- Monitoring: Continuously monitor for the IOCs listed above and alert on any matches.
Valters IT
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.