Denial of Service Vulnerability in Ruby Package: CVE-2018-8777

ruby Updated 02 Oct 2025

Summary

03/04/2018
N/A
Yes i
High
7.5

ALPINE-CVE-2018-8777: In Ruby before 2.2.10, 2.3.x before 2.3.7, 2.4.x before 2.4.4, 2.5.x before 2.5.1, and 2.6.0-preview1, an attacker can pass a large HTTP request with a crafted header to WEBrick server or a crafted body to WEBrick server... Affects ruby versions < 2.5.1-r0. Fixed in 2.5.1-r0. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Your last release was probably never penetration tested Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

Ruby is a dynamic, open-source programming language with a focus on simplicity and productivity. It is widely used for web development, particularly with the Ruby on Rails framework. The Ruby package provides essential libraries and tools for developers to build applications. However, certain versions of Ruby are vulnerable to a denial of service attack due to improper handling of HTTP requests in the WEBrick server, which can lead to significant memory consumption.

Vulnerability Detail

The vulnerability, identified as CVE-2018-8777, affects Ruby versions prior to 2.5.1. An attacker can exploit this vulnerability by sending a large HTTP request with a crafted header or body to the WEBrick server. This can result in excessive memory usage, causing the server to become unresponsive and leading to a denial of service. The issue arises from the server's inability to properly manage memory allocation for large requests, making it susceptible to attacks that aim to exhaust server resources.

How To Fix

Minimum fixed version

2.5.1-r0

This is the first release that contains the fix.

sudo apk add --upgrade ruby

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

If immediate upgrading is not feasible, consider implementing rate limiting on the WEBrick server to mitigate the impact of potential denial of service attacks. Additionally, monitor server logs for unusual request patterns that may indicate an ongoing attack.

Conclusion

CVE-2018-8777 is a significant vulnerability in Ruby that can lead to denial of service attacks through improper handling of HTTP requests in the WEBrick server. It is crucial for users to update to the patched version to protect their applications from potential exploitation.

See every vulnerability recorded for ruby →

Share this vulnerability

FAQ

CVE-2018-8777 is a vulnerability in Ruby that allows attackers to exploit the WEBrick server, leading to denial of service through excessive memory consumption.

Ruby versions prior to 2.5.1 are affected by this vulnerability.

You can use the Vulert playground at Vulert Scanner to check if your application is affected by this vulnerability without needing to sign up.

Implement rate limiting on the WEBrick server and monitor server logs for unusual activity as a temporary workaround.

The CVSS score for CVE-2018-8777 is 7.5, indicating a high severity level.

Related vulnerabilities

Recent vulnerabilities recorded for ruby.

How To Fix

Minimum fixed version

2.5.1-r0

This is the first release that contains the fix.

sudo apk add --upgrade ruby

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback