Your RSA-2048 keys break in 2030. Find every one of them before attackers do.
📦 npm
Not in CISA KEV

CVE-2015-7982 — gm

Fix: aheckmann/gm@5f5c774

CVE-2015-7982 is a remote code execution vulnerability in gm. A fix is available for gm — see the affected versions and patch details below.

Command Injection in gm

Published
Updated
Affected
1 pkg
Patched
1 / 1
Exploits
None indexed
Exploitation data as of Nov 8, 2023 · OSV.dev, FIRST.org (EPSS)

Real-World Exposure

1 pkg affected
📦gm

Real-time download stats are indexed for npm and PyPI packages. This vulnerability affects npm packages — download data is not available via public APIs for these ecosystems.

Description

Versions of gm prior to 1.21.1 are affected by a command injection vulnerability. The vulnerability is triggered when user input is passed into gm.compare(), which fails to sanitize input correctly before calling the graphics magic binary.

Recommendation

Update to version 1.21.1 or later.

Affected Packages

1 total 1 fixed
EcosystemPackageVulnerable rangeFix
📦npmgmall versions1.21.1npm install gm@1.21.1

Detection & mitigation playbook

Open-source dependency
  1. Detect

    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for gm, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.

  2. Fix

    Update gm to 1.21.1 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2015-7982 is resolved across your whole dependency graph.

  3. Workarounds

    Stop passing untrusted input into the interpreter or shell: call the affected binary with an argument array rather than a composed command string, reject anything outside a strict allowlist of expected values, and run the component under an account that cannot reach beyond the work it legitimately does.

Frequently Asked Questions

Versions of `gm` prior to 1.21.1 are affected by a command injection vulnerability. The vulnerability is triggered when user input is passed into `gm.compare()`, which fails to sanitize input correctly before calling the graphics magic binary. ## Recommendation Update to version 1.21.1 or later.
O3 Security · Impact-Aware SCA

Is CVE-2015-7982 in your dependencies?

Find it across npm, including transitive dependencies.

CVE-2015-7982: gm: Command Injection