☠️
EXFILTRATING
DATA...
01010111 10110010 00101001 11000110 01101100 10011011 00010001 11100101 01000010 10101111
[ <-- BACK_TO_SEARCH ]
[ VENDOR STATS ]
CVSS: 7.5 🐛 CWE-125
👁️
Common Weakness Enumeration - Identifies the specific category of software weakness or flaw.

CVE-2025-27788

CVE-2025-27788 Out-of-Bounds Access in Ruby
📅 PUBLISHED: 2025-03-12 13:51 UTC 🔄 UPDATED: 2026-10-02 19:31 UTC
[ OFFICIAL PATCH DEPLOYED ↓ ] FIX: CONFIRMED — 3+ independent sources confirm fix
[ DEFENSE PATCH ↓ ]
💣 PoC: None
👁️
Proof of Concept - Indicates if functional exploit code is publicly available, drastically increasing the risk of immediate attacks.
🎯 EPSS: 0.71%
👁️
0.71% probability
17.6× above the median CVE
Tier: ELEVATED
30-day exploitation window · FIRST.org · updated daily
Patch available — upgrade to latest release
CVSS SEVERITY SCALE
9.0–10.0 CRITICAL
7.0–8.9 HIGH
4.0–6.9 MEDIUM
0.1–3.9 LOW
0.0 NONE
7.5
THREAT LEVEL
■ tracking this CVE ✓ independent patch confirmation ⧗ same-origin mirror (GHSA) ⚠ active exploitation verification policy →

Executive Summary

CVE-2025-27788 is a high-severity vulnerability in the Ruby JSON gem, affecting versions 2.10.0 and 2.10.1. The flaw is an out-of-bounds read that can be triggered by a specially crafted JSON document, leading to a denial of service (DoS) condition, most likely resulting in a crash. The vulnerability is remotely exploitable without authentication, making it a significant threat to applications that parse untrusted JSON input. No known workarounds exist, and the only remediation is to upgrade to version 2.10.2.

⚡ AUTOMATE YOUR CVE INTELLIGENCE

This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.

›Patch confidence — UNVERIFIED to CONFIRMED, cross-referenced NVD + RHSA + Debian
›Exploit & PoC — poc_status, poc_url, has_exploit. Not in NVD.
›Shodan dorks — ready-made queries to find exposed vulnerable systems
›Detection rules — YARA · Wazuh · Elastic (all plans) · Sigma (Pro)
›pending_fields — know exactly which of 7 fields NVD hasn't processed yet
›Free backfill — data incomplete when you paid? Re-check within 30 days = 0 credits
PAYG €0.08/lookup Standard €19/mo (was €29) · 5k credits Pro €65/mo (was €99) · 20k credits FOUNDING PRICE · LOCKED FOR LIFE · ENDS 31 DEC 2026
[ FROM €19/MO ]
Free sandbox key available
No signup required

Supply Chain & Package Security

This vulnerability resides in the json gem, a core component of the Ruby ecosystem. Applications using Ruby's built-in JSON parsing are affected if they use version 2.10.0 or 2.10.1. The gem is widely used in web frameworks (e.g., Ruby on Rails), API services, and data processing pipelines. An attacker can exploit this by sending a malicious JSON payload to any endpoint that parses JSON, causing the application to crash and resulting in a denial of service. This is a supply chain risk because the vulnerable gem is a direct dependency of many Ruby applications.

CVSS Breakdown & Threat Level

  • CVSS Score: 7.5 (High)
  • Attack Vector (AV): Network (N) – Exploitable remotely.
  • Attack Complexity (AC): Low (L) – No special conditions required.
  • Privileges Required (PR): None (N) – No authentication needed.
  • User Interaction (UI): None (N) – No user action required.
  • Scope (S): Unchanged (U) – The vulnerability does not affect other components.
  • Confidentiality (C): None (N) – No data exposure.
  • Integrity (I): None (N) – No data modification.
  • Availability (A): High (H) – Causes a crash, leading to denial of service.

Threat Level: High. The low attack complexity and network exploitability make this a serious threat for any Ruby application processing untrusted JSON.

Deep Dive & Mechanics

The vulnerability is an out-of-bounds read in the JSON gem's parser. When parsing a specially crafted JSON document, the parser reads memory beyond the allocated buffer. This is a classic CWE-125 (Out-of-bounds Read) issue. The root cause is likely an improper bounds check when handling certain JSON structures, such as deeply nested objects, arrays with specific lengths, or malformed escape sequences. The out-of-bounds read can cause a segmentation fault, crashing the Ruby process.

The vulnerable code path is in the C extension of the JSON gem, which is used for performance. The fix in version 2.10.2 likely adds proper bounds checking to prevent reading beyond the input buffer.

Vulnerable vs. Patched Code

The exact code change is not publicly available, but the fix is in version 2.10.2. The vulnerable code (in C) likely looks like:

// Vulnerable (2.10.0, 2.10.1)
while (pos < len) {
    // No bounds check on pos
    char c = input[pos];
    // ... processing that can increment pos beyond len
}

The patched code (2.10.2) would add a bounds check:

// Patched (2.10.2)
while (pos < len) {
    if (pos >= len) break; // Additional safety
    char c = input[pos];
    // ... processing with proper bounds
}

Exploitation & Lab Setup

Red Team

Objective: Cause a denial of service by crashing the Ruby application.

Lab Setup:

  1. Install a vulnerable Ruby environment with JSON gem 2.10.0 or 2.10.1.
  2. Create a simple Ruby script that parses JSON from stdin or a file.
  3. Craft a malicious JSON payload that triggers the out-of-bounds read.

Example Payload (Conceptual):

{"a": [{"b": [{"c": [{"d": "x" * 10000}]}]}]}

Or a deeply nested structure:

[[[[[[[[[[[[[[[[[[[[["crash"]]]]]]]]]]]]]]]]]]]]]

Exploit Execution:

echo '{"a": [{"b": [{"c": [{"d": "x" * 10000}]}]}]}' | ruby -rjson -e 'JSON.parse(STDIN.read)'

Blue Team

Detection:

  • Monitor for repeated application crashes.
  • Look for JSON payloads with unusual nesting depth or length.
  • Use the detection rules below.

Mitigation:

  • Immediately upgrade to JSON gem 2.10.2.
  • If upgrade is not possible, implement a web application firewall (WAF) rule to block excessively large or deeply nested JSON payloads.
  • Restrict network access to the application to trusted sources.

Indicators of Compromise (IOCs)

  • Network: Incoming HTTP requests with JSON payloads containing deeply nested objects (e.g., > 100 levels) or extremely long strings.
  • System: Ruby process crashes with segmentation fault (SIGSEGV) in the json gem's C extension.
  • Logs: Application logs showing JSON::ParserError followed by a crash, or signal SIGSEGV in the Ruby error log.

Detection Engineering

YARA Rule

rule CVE_2025_27788_JSON_OOB_Read {
    meta:
        description = "Detects malicious JSON payloads targeting CVE-2025-27788"
        author = "Valters IT"
        date = "2025-03-20"
        reference = "CVE-2025-27788"
    strings:
        $json_start = "{" ascii wide nocase
        $json_array = "[" ascii wide nocase
        $deep_nest = /(\[|\{){50,}/  // 50+ opening brackets/braces
        $long_string = /"[^"]{1000,}"/  // String > 1000 chars
    condition:
        ($json_start or $json_array) and ($deep_nest or $long_string)
}

Sigma Rule

title: CVE-2025-27788 Ruby JSON Out-of-Bounds Read
id: 12345678-1234-1234-1234-123456789012
status: experimental
description: Detects potential exploitation of CVE-2025-27788 via HTTP requests with malicious JSON
author: Valters IT
date: 2025/03/20
logsource:
    category: webserver
    product: generic
detection:
    selection:
        http.method: POST
        http.content_type: application/json
        http.body|contains|all:
            - '{'
            - '['
    condition: selection and (len(http.body) > 100000 or count(http.body, '{') > 100 or count(http.body, '[') > 100)
falsepositives:
    - Legitimate large JSON payloads
level: high

Suricata Rule

alert http any any -> any any (msg:"CVE-2025-27788 Ruby JSON Out-of-Bounds Read Attempt"; flow:to_server; content:"POST"; http_method; content:"application/json"; http_content_type; pcre:"/(\{|\[){100,}/"; sid:1000001; rev:1;)

Remediation & Mitigation

Immediate:

  • Upgrade the json gem to version 2.10.2 or later: gem update json
  • If using Bundler, update your Gemfile: gem 'json', '>= 2.10.2' and run bundle update json

Compensating Controls (if upgrade is not possible):

  • Implement input validation to reject JSON payloads with excessive nesting depth (e.g., > 50 levels) or string length (e.g., > 10,000 characters).
  • Use a reverse proxy or WAF to filter malicious payloads.
  • Monitor for crashes and restart the application automatically.

Long-term:

  • Keep all Ruby gems updated.
  • Use a dependency scanner (e.g., bundler-audit) to detect vulnerable gems.
  • Consider using a safer JSON parser or sandboxing the parsing process.

Valters IT
DevSecOps & Cyber Threat Intelligence

◈ SOURCE Analysis & enrichment: valtersit.com/cve/CVE-2025-27788/ · CVE data: NVD/MITRE (public domain) · © 2026 ValtersIT Hub
>_ SYSTEM_CORE: INTEL_ACTIVE
90% TEAM-CURATED // 10% AUTOMATED INGESTION.
ALL PATCH REFERENCES AND VERSION DATA SOURCED FROM NVD + OSV OFFICIAL REGISTRIES.