CVE-2026-31806: FreeRDP has a Heap Buffer Overflow in nsc_process_message() via Unchecked SURFACE_BITS_COMMAND Bitmap Dimensions

Published Mar 13, 2026
·
Updated

FreeRDP is a free implementation of the Remote Desktop Protocol. Prior to 3.24.0, the gdisurfacebits() function processes SURFACEBITSCOMMAND messages sent by the RDP server. When the command is handled using NSCodec, the bmp.width and bmp.height values provided by the server are not properly validated against the actual desktop dimensions. A malicious RDP server can supply crafted bmp.width and bmp.height values that exceed the expected surface size. Because these values are used during bitmap decoding and memory operations without proper bounds checking, this can lead to a heap buffer overflow. Since the attacker can also control the associated pixel data transmitted by the server, the overflow may be exploitable to overwrite adjacent heap memory. This vulnerability is fixed in 3.24.0.

Affected Software

2 affected components
FreeRDP freerdp<3.24.0
FreeRDP freerdp<3.24.0

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade FreeRDP to a version that resolves this vulnerability.

    Fixed in 3.24.0
  2. Compensating control

    If you cannot upgrade to FreeRDP 3.24.0 immediately, prevent exposure to untrusted/malicious RDP servers by restricting outbound RDP connections to trusted hosts only (e.g., via network ACL/firewall).

Event History

Mar 13, 2026
CVE Published
via MITRE·05:40 PM
Data Sourced
via MITRE·05:40 PM
DescriptionWeakness
Data Sourced
via Red Hat·06:04 PM
DescriptionSeverityAffected Software
Data Sourced
via NVD·07:54 PM
RemedyDescriptionSeverityWeaknessAffected Software

Frequently Asked Questions

1

What is the severity of CVE-2026-31806?

CVE-2026-31806 describes a Heap Buffer Overflow vulnerability in FreeRDP that can lead to potential code execution.

2

How do I fix CVE-2026-31806?

To fix CVE-2026-31806, upgrade FreeRDP to version 3.24.0 or later where the vulnerability has been addressed.

3

What versions of FreeRDP are affected by CVE-2026-31806?

FreeRDP versions prior to 3.24.0 are affected by CVE-2026-31806.

4

What components of FreeRDP are impacted by CVE-2026-31806?

CVE-2026-31806 impacts the gdi_surface_bits() function within FreeRDP that processes SURFACE_BITS_COMMAND messages.

5

Can CVE-2026-31806 be exploited remotely?

Yes, CVE-2026-31806 can be exploited remotely if an attacker sends malicious SURFACE_BITS_COMMAND messages to a vulnerable FreeRDP installation.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203