CVE-2026-138160 in Gammuinfo

Summary

by MITRE • 11/28/2026

Gammu before 1.45.2 contains a stack-based buffer overflow vulnerability in ReadBackupTextLen() that allows attackers to overwrite stack memory via crafted backup files. Attackers can supply overlong quoted text values decoded into a 10,000-byte stack array during convertbackup, restore, or GSM_ReadBackupFile calls, causing crashes or potential code execution.

If you want to get best quality of vulnerability data, you may have to visit VulDB.

Analysis

by VulDB Data Team • 11/28/2026

The vulnerability identified in Gammu versions prior to 1.45.2 represents a critical security flaw rooted in improper input validation and memory management within the library's backup processing functionality. Specifically, the issue resides in the ReadBackupTextLen function, which is responsible for parsing text data from GSM device backups. The core technical deficiency involves a stack-based buffer overflow that occurs when the application processes crafted or maliciously constructed backup files containing excessively long quoted text values. During operations such as convertbackup, restore, or calls to GSM_ReadBackupFile, the software decodes these input strings into a fixed-size stack array with a capacity of only 10,000 bytes. When an attacker supplies data that exceeds this boundary without adequate bounds checking, the excess characters spill over into adjacent memory locations on the call stack. This type of vulnerability is classically categorized under CWE-121, which denotes a stack-based buffer overflow, and it exploits the fundamental assumption that input lengths will always remain within predefined limits established by the developer.

The operational impact of this flaw extends beyond simple application instability to potentially severe security compromises. In its most immediate form, the memory corruption causes the program to crash, leading to a denial-of-service condition where legitimate users are unable to access or manage their GSM devices through Gammu utilities. However, given that stack-based buffer overflows allow for arbitrary write operations in memory, an attacker with the ability to supply these crafted backup files can potentially overwrite critical control data such as return addresses and saved frame pointers. This capability opens the door to remote code execution if the vulnerable application is run with elevated privileges or processes untrusted input from external sources. The risk is particularly acute for system administrators or developers who routinely handle backups that may have been tampered with, transferred via insecure channels, or generated by compromised devices.

From a threat intelligence perspective, this vulnerability aligns with ATT&CK technique T1203, which covers exploitation of client software, as attackers often use maliciously crafted files to exploit vulnerabilities in applications like Gammu when they are opened or processed. The attack vector typically involves social engineering or supply chain compromise where an attacker distributes a specially formatted backup file that triggers the overflow upon restoration or conversion. Mitigation strategies must prioritize immediate patching by upgrading to version 1.45.2 or later, which includes fixes for this memory safety issue. In environments where updating is not immediately feasible, defensive measures should include implementing strict input validation at the application boundary to ensure text lengths do not exceed expected limits before processing. Additionally, enabling compiler security features such as stack canaries and Address Space Layout Randomization can help mitigate exploitation attempts by detecting corruption or randomizing memory layouts, thereby reducing the likelihood of successful code execution even if an overflow occurs.

Responsible

VulnCheck

Reservation

11/28/2026

Disclosure

11/28/2026

Moderation

accepted

CPE

ready

EPSS

0.00000

KEV

no

Activities

very low

Sources

Do you need the next level of professionalism?

Upgrade your account now!