GPSD Code Injection Vulnerability in gpsprof (CVE-2026-60122)
A high-severity code injection vulnerability, CVE-2026-60122, exists in the gpsprof utility of gpsd through version 3.27.5, allowing an attacker to achieve arbitrary OS command execution by injecting malicious content into GPS input data processed by gnuplot.
A significant code injection vulnerability, identified as CVE-2026-60122, has been discovered in the gpsprof utility within the gpsd project, affecting versions up to 3.27.5. This flaw enables a malicious actor, capable of controlling the input GPS data, to execute arbitrary operating system commands. The vulnerability stems from gpsprof unsafely incorporating attacker-controlled content into a gnuplot heredoc data block. Specifically, by injecting the string "EOD" into the SKY.satellites[].used field, attackers can prematurely terminate the heredoc and append gnuplot system() calls. These injected commands are then executed by gnuplot when it processes the generated plot script in polar mode, running with the privileges of the user who initiated gpsprof. This could lead to full system compromise or data exfiltration on affected Linux and macOS systems.
Attack Chain
- An attacker prepares malicious GPS input data.
- The attacker injects specific malicious content into the
SKY.satellites[].usedfield of the GPS input data. - The injected content includes the string "EOD" to prematurely terminate a
gnuplotheredoc block. - The attacker appends
gnuplot system()calls containing desired OS commands immediately after the "EOD" string. - A legitimate user executes the
gpsprofutility to process the attacker-controlled GPS input data. gpsprofgenerates agnuplotscript, incorporating the unsanitized malicious content andsystem()calls into it.gpsprofinvokesgnuplotto execute the generated script in polar mode.gnuplotprocesses the script, encounters thesystem()calls, and executes the arbitrary OS commands with the privileges of the user runninggpsprof.
Impact
Successful exploitation of CVE-2026-60122 allows for arbitrary OS command execution on the system where gpsprof is run. This grants the attacker the ability to take control of the affected system, potentially leading to unauthorized data access, modification, or deletion, installation of further malicious software, or lateral movement within the network. The impact is direct system compromise as the user running the gpsprof utility. While no specific victim counts are available, any system running the vulnerable versions of gpsd with gpsprof exposed to untrusted GPS data is at risk.
Recommendation
- Patch CVE-2026-60122 immediately by upgrading
gpsdto a version beyond 3.27.5 or applying commit 4c06658. - Deploy the Sigma rule "Detect Gnuplot Spawning Suspicious Child Processes" to your SIEM to identify
gnuplotinitiating unexpected shell processes, which is a strong indicator of exploitation. - Enable process creation logging for
gnuplotandgpsprofon Linux and macOS systems to ensure the detection rule has the necessary telemetry. - Review execution logs for
gpsprofandgnuplotprocesses for any unusual arguments or child processes.
Detection coverage 1
Detect Gnuplot Spawning Suspicious Child Processes
highDetects CVE-2026-60122 exploitation - Identifies gnuplot executing shell processes, which indicates arbitrary OS command execution via injected malicious GPS data.
Detection queries are available on the platform. Get full rules →