CVE-2015-7982
JavaScript vulnerability analysis and mitigation

Overview

The CVE-2015-7982 is a command injection vulnerability affecting the gm (GraphicsMagick) npm package versions prior to 1.21.1. The vulnerability was discovered in the gm.compare() function, which failed to properly sanitize user input before calling the graphics magic binary (GitHub Advisory).

Technical details

The vulnerability exists in the gm.compare() function where arguments weren't being escaped properly before being passed to the GraphicsMagick binary. This security issue was fixed by replacing the child_process.exec implementation with child_process.spawn and properly handling command arguments to prevent command injection (GitHub Commit).

Impact

Successful exploitation of this vulnerability could lead to arbitrary code execution in the context of the application running the gm package. This is particularly dangerous in web applications that process user-supplied images using the gm.compare() function (GitHub Advisory).

Exploitability

The vulnerability is triggered when user input is passed into gm.compare() without proper sanitization. An attacker could exploit this by providing specially crafted input to the compare function, potentially leading to command injection (GitHub Advisory).

Mitigation and workarounds

Users should update to gm version 1.21.1 or later, which contains the security fix. The fix was implemented by changing the command execution method and properly handling command arguments to prevent injection attacks (GitHub Advisory).

Additional resources


SourceThis report was generated using AI

Related JavaScript vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-48170CRITICAL9.1
  • JavaScript logoJavaScript
  • scim-patch
NoYesAug 07, 2026
CVE-2026-48007HIGH8.6
  • JavaScript logoJavaScript
  • @element-hq/element-call-embedded
NoYesAug 07, 2026
CVE-2026-69207MEDIUM5.3
  • JavaScript logoJavaScript
  • hono
NoYesAug 07, 2026
CVE-2026-71850MEDIUM4.8
  • JavaScript logoJavaScript
  • hono
NoYesAug 07, 2026
CVE-2026-71849LOW3.7
  • JavaScript logoJavaScript
  • hono
NoYesAug 07, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management