# CVE-2020-10663: Unsafe object creation in json RubyGem

> Attackers can exploit unsafe object creation in the Ruby JSON gem to potentially execute arbitrary code or cause application-dependent adverse effects.

- **Severity:** High 7.5 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 28 Apr 2020
- **Updated:** 4 Aug 2024
- **Also known as:** ALPINE-CVE-2020-10663, CLEANSTART-2026-ZF36625, DEBIAN-CVE-2020-10663, DLA-2190-1, DLA-2192-1, GHSA-jphg-qwrw-7w9g, MGASA-2020-0186, RHSA-2020:2462, RHSA-2020:2473, RHSA-2020:2670, UBUNTU-CVE-2020-10663, openSUSE-SU-2024:11335-1, openSUSE-SU-2024:11829-1, openSUSE-SU-2024:13160-1, openSUSE-SU-2024:13719-1, openSUSE-SU-2025:15118-1, openSUSE-SU-2026:10351-1

## What is CVE-2020-10663?

CVE-2020-10663 is a high-severity unsafe deserialization vulnerability in Apple Macos, published on 28 Apr 2020. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

The JSON gem through 2.2.0 for Ruby, as used in Ruby 2.4 through 2.4.9, 2.5 through 2.5.7, and 2.6 through 2.6.5, has an Unsafe Object Creation Vulnerability. This is quite similar to CVE-2013-0269, but does not rely on poor garbage-collection behavior within Ruby. Specifically, use of JSON parsing methods can lead to creation of a malicious object within the interpreter, with adverse effects that are application-dependent.

Weakness: CWE-20 (Improper Input Validation)

## Which versions are affected by CVE-2020-10663?

2 open source packages ship an affected version, including json. It affects 5 products.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `json` | RubyGems | All versions | 2.3.0 |
| `json` | RubyGems | All versions | 2.3.0 |
| `pcs` | Red Hat:enterprise_linux:8::highavailability | All versions | 0:0.10.4-6.el8_2.1 |
| `pcs-snmp` | Red Hat:enterprise_linux:8::highavailability | All versions | 0:0.10.4-6.el8_2.1 |
| `pcs` | Red Hat:enterprise_linux:8::resilientstorage | All versions | 0:0.10.4-6.el8_2.1 |
| `pcs-snmp` | Red Hat:enterprise_linux:8::resilientstorage | All versions | 0:0.10.4-6.el8_2.1 |
| `pcs` | Red Hat:rhel_e4s:8.0::highavailability | All versions | 0:0.10.1-4.el8_0.5 |
| `pcs-snmp` | Red Hat:rhel_e4s:8.0::highavailability | All versions | 0:0.10.1-4.el8_0.5 |
| `pcs` | Red Hat:rhel_eus:8.1::highavailability | All versions | 0:0.10.2-4.el8_1.1 |
| `pcs-snmp` | Red Hat:rhel_eus:8.1::highavailability | All versions | 0:0.10.2-4.el8_1.1 |
| `pcs` | Red Hat:rhel_eus:8.1::resilientstorage | All versions | 0:0.10.2-4.el8_1.1 |
| `pcs-snmp` | Red Hat:rhel_eus:8.1::resilientstorage | All versions | 0:0.10.2-4.el8_1.1 |
| `ruby3.2-rubygem-json_pure` | openSUSE:Tumbleweed | All versions | 2.6.3-1.3 |
| `rubygem-json_pure` | openSUSE:Tumbleweed | All versions | 2.6.1-1.1 |
| `rubygem-json_pure` | openSUSE:Tumbleweed | All versions | 2.7.1-1.1 |
| `rubygem-json_pure` | openSUSE:Tumbleweed | All versions | 2.7.6-1.3 |
| `rubygem-json_pure` | openSUSE:Tumbleweed | All versions | 2.7.6-1.5 |

Products: Apple Macos, Debian Debian Linux, Fedoraproject Fedora, Json Project Json, Opensuse Leap.

## How do I fix CVE-2020-10663?

Upgrade json to 2.3.0 or later.

## Is CVE-2020-10663 being exploited?

There is no known exploitation of CVE-2020-10663 in the wild and no public exploit code.

Public exploit code:

- Workaround for CVE-2020-10663 (vulnerability in json gem) (github_poc): https://github.com/rails-lts/json_cve_2020_10663

## Other vulnerabilities in Apple Macos

- [CVE-2026-65400](https://insights.sbomify.com/CVE-2026-65400/): Apple macOS Improper Authentication (critical 9.8, exploited in the wild)
- [CVE-2024-44146](https://insights.sbomify.com/CVE-2024-44146/): Security feature bypass in macOS (critical 10.0)
- [CVE-2024-44148](https://insights.sbomify.com/CVE-2024-44148/): Security feature bypass in macOS (critical 10.0)
- [CVE-2023-38586](https://insights.sbomify.com/CVE-2023-38586/): Security feature bypass in macOS (critical 10.0)
- [CVE-2023-40455](https://insights.sbomify.com/CVE-2023-40455/): Security feature bypass in macOS (critical 10.0)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2020-10663 and fix it if it is affected.

What it is: CVE-2020-10663 is a high-severity unsafe deserialization vulnerability in Apple Macos, published on 28 Apr 2020. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2020-10663 in the wild and no public exploit code.

Affected packages and fixed versions:
- json (RubyGems): affected all versions; fixed in 2.3.0
- json (RubyGems): affected all versions; fixed in 2.3.0

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2020-10663/ (Markdown: https://insights.sbomify.com/CVE-2020-10663/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2020-10663
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2020-10663
- OSV: https://osv.dev/vulnerability/CVE-2020-10663

---
From sbomify Insights: https://insights.sbomify.com/CVE-2020-10663/
Summaries are generated and may contain mistakes; the official description above is the record.
