Integer underflow and heap overflow enable root code execution in neutrinolabs xrdp

Note: This data is for reference and cybersecurity research purposes only.CyStack advises users not to use this information for unlawful purposes.

What is CVE-2022-23613?

CVE-2022-23613 is a vulnerability classified as Integer Underflow (Wrap or Wraparound), affecting xrdp (affected versions: >= 0.9.17, < 0.9.18.1). This vulnerability is rated High, with a CVSS score of 7.8. Current sources do not report this vulnerability as exploited.

Overview

Original source data

xrdp is an open source remote desktop protocol (RDP) server. In affected versions an integer underflow leading to a heap overflow in the sesman server allows any unauthenticated attacker which is able to locally access a sesman server to execute code as root. This vulnerability has been patched in version 0.9.18.1 and above. Users are advised to upgrade. There are no known workarounds.

Affected products and scope

  • neutrinolabs xrdp: The affected range in the record is >= 0.9.17, < 0.9.18.1.
  • The upstream advisory lists 0.9.17 and 0.9.18 as affected and identifies >= 0.9.18.1 as patched.
  • Upstream release notes confirm the fix in 0.9.18.1 and 0.9.19. Upstream also states that 0.10.0 is not vulnerable.
  • Red Hat VEX identifies no currently supported Red Hat product as affected. That is a product-specific Red Hat assessment and does not change the upstream xrdp scope.

Technical details

The affected component is xrdp-sesman, specifically the input path in sesman/sesman.c. sesman_data_in() reads version and size values from a sesman message; the security patch adds HEADER_SIZE and rejects a size below that lower bound as well as a size larger than the available input buffer. The advisory identifies the underlying defect as an integer underflow that can lead to a heap overflow when malformed sesman input is processed. The attacker-controlled data is the message sent to sesman, and exploitation requires access to the sesman server; the described service path does not require authentication. Sesman normally listens on localhost when xrdp is installed, but configuration can make it remotely reachable. Public sources do not describe the complete corruption-to-code-execution sequence and do not provide a safe reproduction procedure.

Exploitability

  • Reachability: Access to sesman is required. In the default configuration, the service listens on localhost; another configuration can expose it remotely.
  • Authentication and interaction: The vulnerability description states that an unauthenticated attacker can provide the relevant input without user interaction.
  • Complexity: The record and advisory describe low attack complexity.
  • Known exploitation: The supplied record marks public_exploit as false and does not establish a known_exploited status. This does not prove that exploitation is impossible or that no undisclosed exploit exists.

Technical impact

Root-level code execution in xrdp-sesman can compromise the confidentiality, integrity, and availability of the host because the controlled process runs with root privileges. A successful attacker could access protected data, modify system or application state, and stop or impair services, subject to host isolation and deployment controls. The direct exposure is limited by the requirement to reach sesman; when it is bound only to localhost, it is not directly reachable from an external network without a local foothold or another path to the host. The record does not establish that the vulnerability has been exploited in a specific incident.

Business impact

Successful exploitation could give an attacker root-level control of a host running xrdp-sesman. Depending on host isolation and the data present, the attacker could read protected information, alter system or application state, install unauthorized code, and disrupt services. Risk is greater when sesman is configured for remote access instead of listening only on localhost. The absence of public exploitation information in the record should not be treated as evidence that unpatched systems are safe.

Remediation

  1. Upgrade affected xrdp installations to the upstream patched release 0.9.18.1. The upstream advisory identifies >= 0.9.18.1 as patched and also lists 0.9.19 and later as patched; upstream separately states that 0.10.0 is not vulnerable.
  2. Inventory and remediate both co-located and separately hosted xrdp and xrdp-sesman deployments. After upgrading, verify that the running binary or package is from a patched release.
  3. No vendor workaround is known. If an upgrade cannot be completed immediately, restrict sesman to its intended localhost scope and remove unnecessary remote exposure as temporary containment; this is not a vendor-confirmed workaround.
  4. After deploying the fix, recheck every host, image, and distribution package containing xrdp so that no affected instance remains.

Detection

  1. Inventory every installed xrdp package and binary, then compare the deployed version with the affected and fixed boundaries listed in the affected summary.
  2. Determine whether xrdp-sesman is enabled and running. Inspect its socket or listening endpoint to confirm whether it is restricted to localhost or exposed to another network.
  3. Review the deployment topology for instances where xrdp and xrdp-sesman run on separate hosts, because those deployments can have a different access scope from a co-located installation.
  4. Review process, service, and privileged-activity telemetry for unexpected root activity following access to sesman. Treat this as precautionary monitoring, not as a confirmed indicator; the absence of suspicious logs does not prove safety.
Sources (21)
Learn more

Run an in-depth assessment with complete web risk management

CyStack VulnScan continuously discovers assets, validates vulnerabilities, and helps security teams prioritize remediation across the organization.