# CVE-2026-58459: gpsd gpsprof Command Injection via gnuplot plot title subtype field

> Attackers can execute arbitrary shell commands by injecting payloads into GPS device subtype fields processed by gpsprof and gnuplot.

- **Severity:** High 8.4 (`CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:A/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Local or same network only
- **Victim action needed:** A user has to click or open something
- **Fix available:** Yes
- **Published:** 9 Jul 2026
- **Updated:** 28 Jul 2026
- **Also known as:** ALSA-2026:51075, ALSA-2026:51153, CLSA-2026-1786360070, CLSA-2026-1786447733, DEBIAN-CVE-2026-58459, GHSA-2hhc-4hqc-4mg8, MGASA-2026-0454, RHSA-2026:51075, RHSA-2026:51153, RLSA-2026:51075, RLSA-2026:51153, UBUNTU-CVE-2026-58459, openSUSE-SU-2026:11276-1

## What is CVE-2026-58459?

CVE-2026-58459 is a high-severity command injection vulnerability in ntpsec gpsd, published on 9 Jul 2026. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.

### Official description

gpsd through release-3.27.5, fixed at commit 4c06658, contains a command injection vulnerability in gpsprof that allows attackers who control the GPS device subtype value to execute arbitrary shell commands by embedding backtick payloads in the gnuplot plot title without proper escaping. The subtype field sourced from a DEVICES JSON log entry or NMEA PGRMT sentence is written into a generated gnuplot program via a set title statement with only double-quote characters escaped, enabling arbitrary shell command execution as the user running gnuplot when the victim renders the generated plot through the gpsprof and gnuplot workflow.

Weakness: CWE-78 (Improper Neutralization of Special Elements used in an OS Command)

## Which versions are affected by CVE-2026-58459?

It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `gpsd` | AlmaLinux:10 | All versions | 1:3.26.1-3.el10_2.1 |
| `gpsd-clients` | AlmaLinux:10 | All versions | 1:3.26.1-3.el10_2.1 |
| `python3-gpsd` | AlmaLinux:10 | All versions | 1:3.26.1-3.el10_2.1 |
| `gpsd-minimal` | AlmaLinux:9 | All versions | 1:3.26.1-2.el9_8.1 |
| `gpsd-minimal-clients` | AlmaLinux:9 | All versions | 1:3.26.1-2.el9_8.1 |
| `gpsd` | Red Hat:enterprise_linux:10.2 | All versions | 1:3.26.1-3.el10_2.1 |
| `gpsd-clients` | Red Hat:enterprise_linux:10.2 | All versions | 1:3.26.1-3.el10_2.1 |
| `gpsd-clients-debuginfo` | Red Hat:enterprise_linux:10.2 | All versions | 1:3.26.1-3.el10_2.1 |
| `gpsd-debuginfo` | Red Hat:enterprise_linux:10.2 | All versions | 1:3.26.1-3.el10_2.1 |
| `gpsd-debugsource` | Red Hat:enterprise_linux:10.2 | All versions | 1:3.26.1-3.el10_2.1 |
| `python3-gpsd` | Red Hat:enterprise_linux:10.2 | All versions | 1:3.26.1-3.el10_2.1 |
| `python3-gpsd-debuginfo` | Red Hat:enterprise_linux:10.2 | All versions | 1:3.26.1-3.el10_2.1 |
| `gpsd-minimal` | Red Hat:enterprise_linux:9::appstream | All versions | 1:3.26.1-2.el9_8.1 |
| `gpsd-minimal-clients` | Red Hat:enterprise_linux:9::appstream | All versions | 1:3.26.1-2.el9_8.1 |
| `gpsd-minimal-clients-debuginfo` | Red Hat:enterprise_linux:9::appstream | All versions | 1:3.26.1-2.el9_8.1 |
| `gpsd-minimal-debuginfo` | Red Hat:enterprise_linux:9::appstream | All versions | 1:3.26.1-2.el9_8.1 |
| `gpsd-minimal-debugsource` | Red Hat:enterprise_linux:9::appstream | All versions | 1:3.26.1-2.el9_8.1 |
| `gpsd` | Rocky Linux:10 | All versions | 1:3.26.1-3.el10_2.1 |
| `gpsd-minimal` | Rocky Linux:9 | All versions | 1:3.26.1-2.el9_8.1 |
| `gpsd` | openSUSE:Tumbleweed | All versions | 3.27.5-3.1 |

Products: Gpsd Project Gpsd.

## How do I fix CVE-2026-58459?

Apply the vendor's patch.

## Is CVE-2026-58459 being exploited?

There is no known exploitation of CVE-2026-58459 in the wild and no public exploit code.

## Other vulnerabilities in ntpsec gpsd

- [CVE-2025-67268](https://insights.sbomify.com/CVE-2025-67268/): Memory corruption in n/a (critical 9.8)
- [CVE-2025-67269](https://insights.sbomify.com/CVE-2025-67269/): Integer overflow in n/a (high 7.5)
- [CVE-2023-43628](https://insights.sbomify.com/CVE-2023-43628/): Integer overflow in GPSd (medium 5.9)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-58459 and fix it if it is affected.

What it is: CVE-2026-58459 is a high-severity command injection vulnerability in ntpsec gpsd, published on 9 Jul 2026. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.
Exploitation: There is no known exploitation of CVE-2026-58459 in the wild and no public exploit code.

Affected product: ntpsec gpsd. No package-level version data is available, so check the vendor advisory linked from the reference page.

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-58459/ (Markdown: https://insights.sbomify.com/CVE-2026-58459/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-58459
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-58459
- OSV: https://osv.dev/vulnerability/CVE-2026-58459

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-58459/
Summaries are generated and may contain mistakes; the official description above is the record.
