# CVE-2018-14632: JSON-Patch Out-of-bounds Write vulnerability

> An out-of-bounds write in OpenShift's oc patch command allows attackers to cause a denial of service on the master API service.

- **Severity:** High 7.7 (`CVSS:3.0/AV:N/AC:L/PR:L/UI:N/S:C/C:N/I:N/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 6 Sep 2018
- **Updated:** 5 Aug 2024
- **Also known as:** GHSA-gxhv-3hwf-wjp9, GO-2021-0076, RHBA-2018:2652, RHSA-2018:2654, UBUNTU-CVE-2018-14632

## What is CVE-2018-14632?

CVE-2018-14632 is a high-severity memory corruption vulnerability in Redhat Openshift Container Platform, published on 6 Sep 2018. Any signed-in user can exploit it over the network, with no action from the victim.

### Official description

An out of bound write can occur when patching an Openshift object using the 'oc patch' functionality in OpenShift Container Platform before 3.7. An attacker can use this flaw to cause a denial of service attack on the Openshift master api service which provides cluster management.

Weakness: CWE-787 (Out-of-bounds Write)

## Which versions are affected by CVE-2018-14632?

5 open source packages ship an affected version, including github.com/evanphx/json-patch. It affects 2 products.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `github.com/evanphx/json-patch` | Go | All versions | 0.5.2, 3.0.1-0.20180525145409-4c9aadca8f89+incompatible |
| `github.com/evanphx/json-patch` | Go | All versions | 0.5.2 |
| `github.com/evanphx/json-patch` | Go | All versions | 0.5.2 |
| `github.com/evanphx/json-patch` | Go | From 3.0.0 | 3.0.1-0.20180525145409-4c9aadca8f89 |
| `github.com/evanphx/json-patch` | Go | From 3.0.0 | 3.0.1-0.20180525145409-4c9aadca8f89 |
| `atomic-openshift` | Red Hat:openshift:3.11::el7 | All versions | 0:3.11.16-1.git.0.b48b8f8.el7 |
| `atomic-openshift-clients` | Red Hat:openshift:3.11::el7 | All versions | 0:3.11.16-1.git.0.b48b8f8.el7 |
| `atomic-openshift-clients-redistributable` | Red Hat:openshift:3.11::el7 | All versions | 0:3.11.16-1.git.0.b48b8f8.el7 |
| `atomic-openshift-docker-excluder` | Red Hat:openshift:3.11::el7 | All versions | 0:3.11.16-1.git.0.b48b8f8.el7 |
| `atomic-openshift-excluder` | Red Hat:openshift:3.11::el7 | All versions | 0:3.11.16-1.git.0.b48b8f8.el7 |
| `atomic-openshift-hyperkube` | Red Hat:openshift:3.11::el7 | All versions | 0:3.11.16-1.git.0.b48b8f8.el7 |
| `atomic-openshift-hypershift` | Red Hat:openshift:3.11::el7 | All versions | 0:3.11.16-1.git.0.b48b8f8.el7 |
| `atomic-openshift-master` | Red Hat:openshift:3.11::el7 | All versions | 0:3.11.16-1.git.0.b48b8f8.el7 |
| `atomic-openshift-node` | Red Hat:openshift:3.11::el7 | All versions | 0:3.11.16-1.git.0.b48b8f8.el7 |
| `atomic-openshift-pod` | Red Hat:openshift:3.11::el7 | All versions | 0:3.11.16-1.git.0.b48b8f8.el7 |
| `atomic-openshift-sdn-ovs` | Red Hat:openshift:3.11::el7 | All versions | 0:3.11.16-1.git.0.b48b8f8.el7 |
| `atomic-openshift-template-service-broker` | Red Hat:openshift:3.11::el7 | All versions | 0:3.11.16-1.git.0.b48b8f8.el7 |
| `atomic-openshift-tests` | Red Hat:openshift:3.11::el7 | All versions | 0:3.11.16-1.git.0.b48b8f8.el7 |
| `atomic-openshift` | Red Hat:openshift:3.6::el7 | All versions | 0:3.6.173.0.130-1.git.0.8d78a39.el7 |
| `atomic-openshift-clients` | Red Hat:openshift:3.6::el7 | All versions | 0:3.6.173.0.130-1.git.0.8d78a39.el7 |
| `atomic-openshift-clients-redistributable` | Red Hat:openshift:3.6::el7 | All versions | 0:3.6.173.0.130-1.git.0.8d78a39.el7 |
| `atomic-openshift-cluster-capacity` | Red Hat:openshift:3.6::el7 | All versions | 0:3.6.173.0.130-1.git.0.8d78a39.el7 |
| `atomic-openshift-docker-excluder` | Red Hat:openshift:3.6::el7 | All versions | 0:3.6.173.0.130-1.git.0.8d78a39.el7 |
| `atomic-openshift-dockerregistry` | Red Hat:openshift:3.6::el7 | All versions | 0:3.6.173.0.130-1.git.0.8d78a39.el7 |
| `atomic-openshift-excluder` | Red Hat:openshift:3.6::el7 | All versions | 0:3.6.173.0.130-1.git.0.8d78a39.el7 |
| `atomic-openshift-federation-services` | Red Hat:openshift:3.6::el7 | All versions | 0:3.6.173.0.130-1.git.0.8d78a39.el7 |
| `atomic-openshift-master` | Red Hat:openshift:3.6::el7 | All versions | 0:3.6.173.0.130-1.git.0.8d78a39.el7 |
| `atomic-openshift-node` | Red Hat:openshift:3.6::el7 | All versions | 0:3.6.173.0.130-1.git.0.8d78a39.el7 |
| `atomic-openshift-pod` | Red Hat:openshift:3.6::el7 | All versions | 0:3.6.173.0.130-1.git.0.8d78a39.el7 |
| `atomic-openshift-sdn-ovs` | Red Hat:openshift:3.6::el7 | All versions | 0:3.6.173.0.130-1.git.0.8d78a39.el7 |
| `atomic-openshift-service-catalog` | Red Hat:openshift:3.6::el7 | All versions | 0:3.6.173.0.130-1.git.0.8d78a39.el7 |
| `atomic-openshift-tests` | Red Hat:openshift:3.6::el7 | All versions | 0:3.6.173.0.130-1.git.0.8d78a39.el7 |
| `tuned-profiles-atomic-openshift-node` | Red Hat:openshift:3.6::el7 | All versions | 0:3.6.173.0.130-1.git.0.8d78a39.el7 |

Products: Redhat Openshift Container Platform, Starcounter-Jack Json-Patch.

## How do I fix CVE-2018-14632?

Upgrade github.com/evanphx/json-patch to a fixed version for your release line: 0.5.2, 3.0.1-0.20180525145409-4c9aadca8f89+incompatible or 3.0.1-0.20180525145409-4c9aadca8f89.

## Is CVE-2018-14632 being exploited?

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

## Other vulnerabilities in Redhat Openshift Container Platform

- [CVE-2020-27836](https://insights.sbomify.com/CVE-2020-27836/): Missing authorization in cluster-ingress-operator (critical 9.8)
- [CVE-2018-1085](https://insights.sbomify.com/CVE-2018-1085/): Misconfiguration in openshift-ansible (critical 9.0)
- [CVE-2026-54099](https://insights.sbomify.com/CVE-2026-54099/): Privilege escalation in Red Hat OpenShift Container Platform 4 (high 8.8)
- [CVE-2026-1784](https://insights.sbomify.com/CVE-2026-1784/): Ose-cluster-ingress-operator: remote code execution through haproxy configuration injection (high 8.8)
- [CVE-2021-20182](https://insights.sbomify.com/CVE-2021-20182/): Privilege escalation in openshift (high 8.8)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2018-14632 and fix it if it is affected.

What it is: CVE-2018-14632 is a high-severity memory corruption vulnerability in Redhat Openshift Container Platform, published on 6 Sep 2018. Any signed-in user can exploit it over the network, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2018-14632 in the wild and no public exploit code.

Affected packages and fixed versions:
- github.com/evanphx/json-patch (Go): affected all versions; fixed in 0.5.2, 3.0.1-0.20180525145409-4c9aadca8f89+incompatible
- github.com/evanphx/json-patch (Go): affected all versions; fixed in 0.5.2
- github.com/evanphx/json-patch (Go): affected all versions; fixed in 0.5.2
- github.com/evanphx/json-patch (Go): affected from 3.0.0; fixed in 3.0.1-0.20180525145409-4c9aadca8f89
- github.com/evanphx/json-patch (Go): affected from 3.0.0; fixed in 3.0.1-0.20180525145409-4c9aadca8f89

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

## Sources

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

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