CVE-2025-27788: Json Out-of-bounds Read Vulnerability

HIGH
Advisory Identifier: GHSA-9m3q-rhmv-5q44
CVSS 7.5
CWE-125
Published
Advisory Summary

CVE-2025-27788 is a HIGH (CVSS 7.5) out-of-bounds read vulnerability (CWE-125: Out-of-bounds Read) affecting Json libraries in the RubyGems ecosystem. The issue involves out-of-bounds read in ruby json parser. Remediation is available by upgrading affected packages to version 2.10.2.

CVE-2025-27788 at a Glance

CVE Identifier CVE-2025-27788
GHSA Identifier GHSA-9m3q-rhmv-5q44
Severity HIGH
CVSS v3.1 Base Score 7.5
CWE Classification CWE-125: Out-of-bounds Read
Affected Product Json
Package Ecosystem RubyGems
Published Date
Last Updated

Security Impact

CVSS: 7.5

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality None (C:N)
Integrity None (I:N)
Availability High (A:H)

How to Fix CVE-2025-27788

To remediate this vulnerability, upgrade all affected Json dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

json fixed: 2.10.2
Upgrade json to 2.10.2
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for json

How to Check if You Are Affected

To determine whether your application is affected by CVE-2025-27788, inspect your project dependencies for Json:

inspect dependencies for json

Analyze the terminal output to locate any version of Json in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.10.2), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-125: Out-of-bounds Read, where the product reads data past the end, or before the beginning, of the intended buffer. In Json, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### Impact A specially crafted document could cause an out of bound read, most likely resulting in a crash. Versions 2.10.0 and 2.10.1 are impacted. Older versions are not. ### Patches Version 2.10.2 fixes the problem. ### Workarounds None.

CVE-2025-27788 Affected Json Versions

1 component(s)
Fixed Versions:
2.10.2
Product / Package Ecosystem Affected Versions Fixed Version
json
RubyGems
≥ 2.10.0
< 2.10.2
2.10.2

References

Frequently Asked Questions

What is CVE-2025-27788?
CVE-2025-27788 is a security vulnerability in Json involving Out-of-bounds Read in Ruby JSON Parser under CWE-125: Out-of-bounds Read.
Which Json versions are affected?
Affected versions include releases prior to 2.10.2 across affected packages: json.
What version fixes CVE-2025-27788?
Upgrading to 2.10.2 (or the latest patched release for your respective branch) resolves the vulnerability.
Is json affected?
Yes, json is affected in releases prior to 2.10.2. Upgrade your dependency to 2.10.2 or later.
What is the CVSS score of CVE-2025-27788?
CVE-2025-27788 has a CVSS v3.1 base score of 7.5 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H.
What CWE is associated with CVE-2025-27788?
CVE-2025-27788 is classified under CWE-125: Out-of-bounds Read (The product reads data past the end, or before the beginning, of the intended buffer.).
How can I check RubyGems dependencies for CVE-2025-27788?
Run the dependency tree command: 'inspect dependencies for json'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-9m3q-rhmv-5q44",
  "modified" : "2025-03-13T21:41:39Z",
  "published" : "2025-03-12T15:35:23Z",
  "aliases" : [ "CVE-2025-27788" ],
  "summary" : "Out-of-bounds Read in Ruby JSON Parser ",
  "details" : "### Impact\n\nA specially crafted document could cause an out of bound read, most likely resulting in a crash.\n\nVersions 2.10.0 and 2.10.1 are impacted. Older versions are not.\n\n### Patches\n\nVersion 2.10.2 fixes the problem.\n\n### Workarounds\n\nNone.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "RubyGems",
      "name" : "json"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.10.0"
      }, {
        "fixed" : "2.10.2"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 2.10.1"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/ruby/json/security/advisories/GHSA-9m3q-rhmv-5q44"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-27788"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/ruby/json/commit/c56db31f800d5d508389793e69682f99749dbadf"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/ruby/json"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/ruby/json/releases/tag/v2.10.2"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/rubysec/ruby-advisory-db/blob/master/gems/json/CVE-2025-27788.yml"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-125" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2025-03-12T15:35:23Z",
    "nvd_published_at" : "2025-03-12T14:15:16Z"
  }
}