CVE-2015-4410
Ruby vulnerability analysis and mitigation

Overview

CVE-2015-4410 affects the Moped::BSON::ObjecId.legal? method in rubygem-moped before commit dd5a7c14b5d2e466f7875d079af71ad19774609b. The vulnerability was discovered in 2015 and involves improper input validation in the regular expression implementation used for validating ObjectId strings (Sakurity Blog, OSS Security).

Technical details

The vulnerability stems from the use of ^$ anchors in regular expressions instead of \A\z for string boundary matching in Ruby. The vulnerable implementation used the pattern /^[0-9a-f]{24}$/i for validating ObjectId strings, which in Ruby's default multiline mode allows for injection of newline characters, bypassing the intended validation (Sakurity Blog). The vulnerability has a CVSS v3.1 Base Score of 7.5 (HIGH) with vector CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H (NVD).

Impact

The vulnerability allows remote attackers to cause a denial of service (worker resource consumption) through crafted strings or perform cross-site scripting (XSS) attacks. When exploited, it can cause MongoDB to respond with assertion errors, leading to multiple retry attempts and resource consumption (Sakurity Blog, Red Hat Bugzilla).

Exploitability

The vulnerability is exploitable remotely without authentication. Proof-of-concept exploits have been published demonstrating both the denial of service and potential BSON injection attacks. The vulnerability can be triggered by sending specially crafted ObjectId strings containing newline characters (Sakurity Blog).

Mitigation and workarounds

The vulnerability was fixed by replacing the vulnerable regular expression pattern /^[0-9a-f]{24}$/i with /\A\h{24}\z/i. Users should update to a version of rubygem-moped that includes commit dd5a7c14b5d2e466f7875d079af71ad19774609b or later (Github Commit).

Community reactions

The security community highlighted this as an example of a common Ruby regular expression pitfall. The vulnerability sparked discussions about the default behavior of regular expression anchors in Ruby and proper string boundary matching practices (Homakov Blog).

Additional resources


SourceThis report was generated using AI

Related Ruby vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-55107CRITICAL10
  • Ruby logoRuby
  • kobako
NoYesAug 18, 2026
CVE-2026-61666HIGH8.9
  • Ruby logoRuby
  • websocket-driver
NoYesAug 17, 2026
CVE-2026-73648MEDIUM5.1
  • Ruby logoRuby
  • ruby3.4-rails-8.1
NoYesAug 13, 2026
CVE-2026-73426MEDIUM4.6
  • JavaScript logoJavaScript
  • action_text-trix
NoYesAug 18, 2026
CVE-2026-73428MEDIUM4.6
  • JavaScript logoJavaScript
  • action_text-trix
NoYesAug 13, 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