vendor:
4digits
by:
N_A
9,3
CVSS
HIGH
Buffer Overflow
120
CWE
Product Name: 4digits
Affected Version From: 1.1.4
Affected Version To: 1.1.4
Patch Exists: NO
Related CWE: N/A
CPE: a:fourdigits:4digits
Metasploit:
N/A
Other Scripts:
N/A
Tags: N/A
CVSS Metrics: N/A
Nuclei References:
N/A
Nuclei Metadata: N/A
Platforms Tested: Kali Linux
2020
4digits 1.1.4 Local Buffer Overflow Privilege Escalation (if setuid/setgid)
4digits version 1.1.4 and possibly earlier versions suffer from a buffer overflow vulnerability where possible code execution can occur and privileges can be escalated if this is setuid/setgid. The vulnerability is found within the 4digits-text binary version of the game. An environment variable is not checked thoroughly before it is passed to the function save_score() when a user wins at the game. An attacker may be able to execute arbitary code by setting the HOME variable to a large string and running the game in GDB.
Mitigation:
Ensure that environment variables are properly checked and sanitized before being passed to functions.