CVE-2026-2302 Unsafe Reflection in Mongoid::Criteria.from_hash

Medium 6.9 Published Updated

Attackers can execute arbitrary Ruby code via malicious Hash values in Mongoid::Criteria.from_hash, affecting MongoDB Ruby Driver users.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Over the internet
Victim action needed
A user has to click or open something
Fix
None listed

What is CVE-2026-2302?

CVE-2026-2302 is a medium-severity code injection vulnerability in MongoDB Ruby Driver, published on 10 Feb 2026. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link.

Official description

Under specific conditions when processing a maliciously crafted value of type Hash r, Mongoid::Criteria.from_hash may allow for executing arbitrary Ruby code.

Weakness: CWE-183

Which versions are affected by CVE-2026-2302?

How do I fix CVE-2026-2302?

No fix has been published for CVE-2026-2302 yet. Limit exposure of the affected software until one is available.

Upgrade, and never evaluate templates, expressions or code built from user input. More about Code injection.

Is CVE-2026-2302 being exploited?

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

Sources

Also known as GHSA-68xj-h57p-gg5j, UBUNTU-CVE-2026-2302.

Is CVE-2026-2302 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free