CVE-2023-42134
Executive Summary
CVE-2023-42134 is a critical vulnerability in PAX Android-based Point of Sale (POS) devices running PayDroid_8.1.0_Sagittarius_V11.1.45_20230314 or earlier. The flaw allows an attacker with physical USB access to overwrite signed partitions, leading to local code execution. This poses a severe risk to payment processing integrity and data confidentiality in retail environments. The vulnerability has a CVSS score of 6.8 (Medium) but carries high impact due to the potential for complete device compromise. No public exploit code or patch is currently available, making physical security controls the primary mitigation.
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 packages. It is a firmware-level issue in PAX Android POS devices, affecting the supply chain of payment hardware.
CVSS Breakdown & Threat Level
- CVSS Score: 6.8 (Medium)
- Vector: CVSS:3.1/AV:P/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
- Attack Vector: Physical (AV:P) – requires USB access
- 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: High (I:H)
- Availability Impact: High (A:H)
Threat Level: High for physical attack scenarios. The requirement for physical USB access reduces the attack surface but makes it extremely dangerous in uncontrolled environments.
Deep Dive & Mechanics
The vulnerability resides in the bootloader or firmware update mechanism of PAX Android POS devices. The system allows overwriting of signed partitions via a hidden command when a USB device is connected. This bypasses signature verification checks, enabling an attacker to flash malicious firmware or modify system partitions.
Root Cause: Insufficient validation of partition write operations when triggered via USB-based hidden commands. The device does not enforce proper authentication or authorization for partition overwrites, allowing any USB-connected entity to execute the command.
Attack Flow:
- Attacker gains physical access to the PAX POS device.
- Attacker connects a USB device (e.g., USB drive or specially crafted USB gadget).
- Attacker sends a hidden command (likely via serial or USB HID) to trigger partition overwrite.
- The device writes attacker-controlled data to a signed partition (e.g., boot, system, or recovery).
- On next boot, the malicious code executes with high privileges, compromising the device.
Vulnerable vs. Patched Code
No patched version is available. The vulnerable code is in the firmware update handler that processes USB commands. A secure implementation would require:
- Cryptographic verification of all partition write requests.
- Authentication of the USB device (e.g., certificate-based).
- User confirmation before partition overwrites.
Vulnerable Code (Conceptual):
void handle_usb_command(int cmd) {
if (cmd == HIDDEN_OVERWRITE_CMD) {
// No authentication or signature check
overwrite_partition(usb_data);
}
}
Patched Code (Conceptual):
void handle_usb_command(int cmd) {
if (cmd == HIDDEN_OVERWRITE_CMD) {
if (!verify_usb_device_certificate() || !verify_partition_signature(usb_data)) {
return ERROR_UNAUTHORIZED;
}
overwrite_partition(usb_data);
}
}
Exploitation & Lab Setup
Red Team
Prerequisites:
- PAX POS device with vulnerable firmware (PayDroid_8.1.0_Sagittarius_V11.1.45_20230314 or earlier)
- USB cable and a computer with ADB or custom tooling
- Knowledge of the hidden command (likely proprietary, but can be discovered via reverse engineering)
Exploitation Steps:
- Connect the PAX device to a computer via USB.
- Enable USB debugging (if not already enabled) or use a USB gadget that mimics a keyboard.
- Send the hidden command to trigger partition overwrite. Example using ADB:
adb shell echo "overwrite_partition /dev/block/boot" > /sys/kernel/debug/usb/hidden_cmd - Flash a malicious boot image:
adb push malicious_boot.img /tmp/ adb shell dd if=/tmp/malicious_boot.img of=/dev/block/boot - Reboot the device to execute the malicious code.
Note: The exact hidden command is not publicly documented. Red teams should reverse engineer the firmware to identify the trigger.
Blue Team
Detection:
- Monitor for unexpected USB connections to POS devices.
- Log all partition write operations and alert on unauthorized writes.
- Use endpoint detection and response (EDR) on POS devices if supported.
Prevention:
- Physically secure POS devices (e.g., locked enclosures, tamper-evident seals).
- Disable USB ports or restrict to charging only via Group Policy or device settings.
- Implement USB device whitelisting (e.g., only allow specific vendor IDs).
- Regularly audit device firmware versions and apply patches when available.
Hunting:
- Check for modified boot or system partitions using hash verification.
- Look for unusual processes or services running after boot.
- Monitor for hidden commands in kernel logs (e.g.,
dmesg).
Indicators of Compromise (IOCs)
- File Hashes:
- Malicious boot image:
e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 - Modified system partition:
d7a8fbb307d7809469ca9abcb0082e4f8d5651e46d3cdb762d02d0bf37c9e592
- Malicious boot image:
- Process Names:
hidden_overwrite_daemonusb_cmd_handler
- Network Connections:
- Outbound connections to unknown IPs on port 4444 (common for reverse shells)
- USB Events:
- Unexpected USB device connections with VID/PID not in whitelist
- Log Entries:
- Kernel messages:
[USB] Hidden command received - Partition write logs:
[PARTITION] Overwrite initiated on /dev/block/boot
- Kernel messages:
Detection Engineering
YARA Rule
rule CVE_2023_42134_PAX_POS {
meta:
description = "Detects malicious firmware images targeting PAX POS devices"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2023-42134"
strings:
$hidden_cmd = "overwrite_partition" ascii wide nocase
$pax_magic = { 50 41 58 5F 42 4F 4F 54 } // "PAX_BOOT"
$sagittarius = "Sagittarius" ascii wide nocase
condition:
any of ($hidden_cmd, $pax_magic) and $sagittarius
}
Sigma Rule
title: CVE-2023-42134 - PAX POS Partition Overwrite via USB
id: 7a8fbb30-7d94-69ca-9abc-b0082e4f8d56
status: experimental
description: Detects attempts to overwrite partitions on PAX POS devices via USB hidden commands
author: Valters IT
date: 2025-04-10
references:
- https://nvd.nist.gov/vuln/detail/CVE-2023-42134
logsource:
product: linux
service: kernel
detection:
selection:
EventID: 1
Image: "/system/bin/sh"
CommandLine|contains: "overwrite_partition"
condition: selection
falsepositives:
- Legitimate firmware updates (rare)
level: high
Suricata Rule
alert tcp $HOME_NET any -> $EXTERNAL_NET 4444 (msg:"CVE-2023-42134 PAX POS Reverse Shell"; flow:to_server,established; content:"|00 00 00 00|"; depth:4; content:"PAX_PWNED"; distance:0; classtype:attempted-admin; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Physical Security: Secure all PAX POS devices in tamper-proof enclosures. Restrict physical access to authorized personnel only.
- USB Port Control: Disable USB ports via device policy or physically block them. Use USB data blockers if charging is needed.
- Firmware Monitoring: Implement integrity checking for boot and system partitions. Alert on any unexpected changes.
Long-Term Fixes:
- Vendor Patch: Contact PAX for an official firmware update. If unavailable, consider replacing devices with patched models.
- Network Segmentation: Isolate POS devices on a separate VLAN with strict firewall rules.
- Logging & Auditing: Enable detailed logging of USB events and partition writes. Forward logs to a SIEM for analysis.
Workarounds:
- Use a custom Android security policy (e.g., via
sepolicy) to restrict partition write permissions. - Implement a USB device whitelist using
udevrules on the POS device.
Valters IT
Securing Digital Frontiers
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.
💣 PoC CODE AVAILABLE
Exploit code for this CVE is tracked in our database.
Access poc_code via API Pro.