Skip to content

[GHSA-pjh3-jv7w-9jpr] Command Injection in gm - #9617

Open
nikpivkin wants to merge 2 commits into
nikpivkin/advisory-improvement-9617from
nikpivkin-GHSA-pjh3-jv7w-9jpr
Open

nikpivkin wants to merge 2 commits into
nikpivkin/advisory-improvement-9617from
nikpivkin-GHSA-pjh3-jv7w-9jpr

Conversation

@nikpivkin

@nikpivkin nikpivkin commented Sep 19, 2026

Copy link
Copy Markdown

Updates

  • Affected products

Comments
The first patched version should be 1.21.0, not 1.21.1.

The fix commit linked in the advisory is aheckmann/gm@5f5c774. It is the commit of tag 1.21.0, and tag 1.20.0 does not contain it. The project changelog marks 1.21.0 as "contains security fix" with the entry "gm.compare fails to escape arguments properly": https://github.com/aheckmann/gm/blob/master/History.md

Version 1.21.1 came out two hours later. It fixed a regression from the same change, where the gm binary path was hard coded, and it did not change the escaping.

The regression only breaks compare() when gm is not in /usr/bin or when ImageMagick is used. It is a functional bug and not a security issue, so 1.21.0 is not vulnerable.

The OSV export takes the fixed version from the first patched version, so version 1.21.0 is reported as vulnerable even though it has the fix.

Copilot AI balanced review requested due to automatic review settings September 19, 2026 12:21
@github-actions
github-actions Bot changed the base branch from main to nikpivkin/advisory-improvement-9617 September 19, 2026 12:21

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

The advisory details and recommendation still incorrectly identify 1.21.1 as the first patched version.

Get a fresh assessment by requesting another Copilot review.

Review effort: Balanced
Findings: 1 Low severity

Open (1)
What changed in this PR

Corrects the first patched gm version for GHSA-pjh3-jv7w-9jpr.

Changes:

  • Changes the fixed version from 1.21.1 to 1.21.0.
  • Updates the advisory modification timestamp.
File Description
GHSA-pjh3-jv7w-9jpr.json Corrects the affected-version range.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟢 Approval recommended

The 1.21.0 tag contains the security fix, while 1.21.1 only addresses subsequent regressions.

Review effort: Balanced
Findings: None

Resolved since last review (1)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants