CVE-2015-4411
Ruby vulnerability analysis and mitigation

Overview

The Moped::BSON::ObjecId.legal? method in mongodb/bson-ruby before 3.0.4 as used in rubygem-moped contains a vulnerability that allows remote attackers to cause a denial of service through worker resource consumption via a crafted string. This vulnerability (CVE-2015-4411) was discovered as an incomplete fix to CVE-2015-4410 and was disclosed in June 2015 (OSS Security).

Technical details

The vulnerability stems from the improper implementation of regular expressions in the legal? method. The issue arose when the method began using the \A\h{24}\Z regular expression pattern, which was problematic because it allowed a trailing newline character. This implementation would cause Moped to incorrectly process ObjectId validation, leading to resource consumption issues (Sakurity Blog).

Impact

When exploited, this vulnerability causes Moped to think MongoDB is down, resulting in 40 repeated connection attempts with intervals. This keeps a worker busy for approximately 5 seconds and generates multiple unnecessary requests to MongoDB, effectively creating a denial of service condition (Sakurity Blog).

Mitigation and workarounds

The vulnerability was fixed in mongodb/bson-ruby version 3.0.4 by modifying the regular expression pattern to use \A\h{24}\z instead of \A\h{24}\Z. Users should upgrade to this version or later to address the vulnerability (Github Commit).

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-2025-68271CRITICAL10
  • RubyRuby
  • openc3
NoYesJan 13, 2026
GHSA-5qw5-wf2q-f538HIGH8.8
  • RubyRuby
  • activerecord-jdbc-adapter
NoYesJan 16, 2026
CVE-2026-22589HIGH7.5
  • RubyRuby
  • spree_core
NoYesJan 10, 2026
GHSA-mpwp-4h2m-765cMEDIUM6.6
  • RubyRuby
  • activejob
NoYesJan 16, 2026
CVE-2026-22588MEDIUM6.5
  • RubyRuby
  • spree_api
NoYesJan 08, 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