# CVE-2014-4616: simplejson before 2.6.1 vulnerable to array index error

> Attackers can read arbitrary process memory via a negative index in the raw_decode function of the Python JSON module.

- **Severity:** Medium 5.9 (`CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/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:** 24 Aug 2017
- **Updated:** 6 Aug 2024
- **Also known as:** ALPINE-CVE-2014-4616, DEBIAN-CVE-2014-4616, GHSA-9772-cwx9-r4cj, MGASA-2014-0286, PSF-2017-1, PYSEC-2026-921, UBUNTU-CVE-2014-4616

## What is CVE-2014-4616?

CVE-2014-4616 is a medium-severity vulnerability in Opensuse Opensuse, published on 24 Aug 2017. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

Array index error in the scanstring function in the _json module in Python 2.7 through 3.5 and simplejson before 2.6.1 allows context-dependent attackers to read arbitrary process memory via a negative index value in the idx argument to the raw_decode function.

Weakness: CWE-129 (Improper Validation of Array Index)

## Which versions are affected by CVE-2014-4616?

3 open source packages ship an affected version, including simplejson. It affects 4 products.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `simplejson` | PyPI | All versions | 2.6.1 |
| `simplejson` | PyPI | All versions | 2.6.1 |
| `simplejson` | PyPI | All versions | 2.6.1 |

Products: Opensuse Opensuse, Opensuse Project Opensuse, Python Python, Simplejson Project Simplejson.

## How do I fix CVE-2014-4616?

Upgrade simplejson to 2.6.1 or later.

## Is CVE-2014-4616 being exploited?

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

## Other vulnerabilities in Opensuse Opensuse

- [CVE-2015-5957](https://insights.sbomify.com/CVE-2015-5957/): Memory corruption in n/a (critical 10.0)
- [CVE-2015-0491](https://insights.sbomify.com/CVE-2015-0491/): Memory corruption in n/a (critical 10.0)
- [CVE-2008-2388](https://insights.sbomify.com/CVE-2008-2388/): Integer overflow in n/a (critical 10.0)
- [CVE-2010-1866](https://insights.sbomify.com/CVE-2010-1866/): Integer overflow in n/a (critical 9.8)
- [CVE-2015-0492](https://insights.sbomify.com/CVE-2015-0492/): Other in n/a (critical 9.3)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2014-4616 and fix it if it is affected.

What it is: CVE-2014-4616 is a medium-severity vulnerability in Opensuse Opensuse, published on 24 Aug 2017. 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-2014-4616 in the wild and no public exploit code.

Affected packages and fixed versions:
- simplejson (PyPI): affected all versions; fixed in 2.6.1
- simplejson (PyPI): affected all versions; fixed in 2.6.1
- simplejson (PyPI): affected all versions; fixed in 2.6.1

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-2014-4616/ (Markdown: https://insights.sbomify.com/CVE-2014-4616/index.md)
```

## Sources

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

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