# net-imap vulnerable to command Injection via "raw" arguments to multiple commands

Advisory record · `GHSA-hm49-wcqc-g2xg`

- **Identifiers:** `GHSA-hm49-wcqc-g2xg` · `CVE-2026-42257`
- **State:** Confirmed
- **Severity:** CVSS 5.8 Medium
- **Critical:** No
- **Weakness (CWE):** [CWE-77](https://cwe.mitre.org/data/definitions/77.html) · [CWE-93](https://cwe.mitre.org/data/definitions/93.html)
- **Tags:** [Command injection](https://agentprime.io/advisories/tag/command-injection.md) · [Other injection](https://agentprime.io/advisories/tag/injection.md)
- **Published:** 4 May 2026
- **Updated:** 10 Sept 2026
- **Reviewed by a person:** No

Published by the GitHub Advisory Database at 4 May 2026, 22:04 UTC. agentprime has not analysed this yet, so whether it affects any app is not known.

## Affected packages

- `net-imap` (RubyGems): affected `>=0.6.0, <0.6.4 || >=0.5.0, <0.5.14 || <0.4.24`; fixed in `0.6.4`, `0.5.14`, `0.4.24`

## Not analysed yet

We haven’t published our analysis of this Advisory yet. Once a person has reviewed it, this page will say what’s vulnerable, what has to be true for your app to be affected, and how to check.

## Severity and exploitation

- 5.8 Medium, CVSS 4.0: `CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:P/VC:N/VI:H/VA:L/SC:N/SI:N/SA:N`, from CNA (GitHub_M)

- **CISA KEV:** Not listed.
- **EPSS:** 0.0043, the 37th percentile, on 5 Nov 2026: FIRST’s estimate of the chance of exploitation in the next 30 days.

## Timeline

- 31 Oct 2026, 15:16 UTC: First seen by agentprime
- 31 Oct 2026, 15:16 UTC: [Confirmed by OSV](https://osv.dev/vulnerability/GHSA-hm49-wcqc-g2xg)

## Sources

- [GitHub Advisory Database: GHSA-hm49-wcqc-g2xg](https://github.com/advisories/GHSA-hm49-wcqc-g2xg)
- [OSV: GHSA-hm49-wcqc-g2xg](https://osv.dev/vulnerability/GHSA-hm49-wcqc-g2xg)
- <https://github.com/ruby/net-imap/security/advisories/GHSA-hm49-wcqc-g2xg>
- <https://nvd.nist.gov/vuln/detail/CVE-2026-42257>
- <https://github.com/ruby/net-imap/commit/0ec4fd351263e8b9a4f683713427827b7b1ad974>
- <https://github.com/ruby/net-imap/commit/47c72186d272441878ca73c9499f66013829ca2f>
- <https://github.com/ruby/net-imap/commit/6bf02aef7e0b5931010c36e377f79a71636b306b>
- <https://github.com/ruby/net-imap/commit/a4f7649c3da77dec7631f03a037a478eb4330048>
- <https://github.com/ruby/net-imap/commit/aec06996eb87a7e1bbcef1f9f8926e8add2b8c71>
- <https://github.com/ruby/net-imap>
- <https://github.com/ruby/net-imap/releases/tag/v0.4.24>
- <https://github.com/ruby/net-imap/releases/tag/v0.5.14>
- <https://github.com/ruby/net-imap/releases/tag/v0.6.4>
- <https://github.com/rubysec/ruby-advisory-db/blob/master/gems/net-imap/CVE-2026-42257.yml>

Facts on this page come from the GitHub Advisory Database (CC-BY 4.0), OSV and the other sources listed, as published. We don’t reproduce full advisory descriptions, which can contain exploit code.

## Check whether this affects you

A Match means an installed version is in the affected range above. Most don’t affect the app; agentprime hasn’t analysed this one yet.

- With the agentprime MCP server (<https://api.agentprime.io/mcp>), ask your agent to check the project: `check_lockfile` sends a lockfile, `check_packages` a list of installed packages, and both return the Matches and the upgrades that clear them. `get_advisory` returns this record. Setup: <https://agentprime.io/mcp.md>
- In a browser: <https://agentprime.io/check/> reads your lockfile in the browser, never uploading it.
- Whether it touches your code, with file and line: the Claude Code plugin, <https://agentprime.io/plugin.md>
- As JSON: <https://api.agentprime.io/v1/advisories/GHSA-hm49-wcqc-g2xg>, or `POST https://api.agentprime.io/v1/match` with your packages (<https://agentprime.io/api.md>)

---

The web page: <https://agentprime.io/advisories/GHSA-hm49-wcqc-g2xg/>. Everything for agents: <https://agentprime.io/llms.txt>.
