---
id: CVE-2018-12115
title: >-
  In all versions of Node.js prior to 6.14.4, 8.11.4 and 10.9.0 when used with
  UCS-2 encoding (recognized by Node.js under the names `'ucs2'`, `'ucs-2'`,
  `'utf16le'` and `'utf-16le'`), `Buffer#write()` can be abused to write outside
  of the…
summary: >-
  In all versions of Node.js prior to 6.14.4, 8.11.4 and 10.9.0 when used with
  UCS-2 encoding (recognized by Node.js under the names `'ucs2'`, `'ucs-2'`,
  `'utf16le'` and `'utf-16le'`), `Buffer#write()` can be abused to write outside
  of the…
severity: high
cvss: 7.5
cvssVector: 'CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H'
cwe:
  - CWE-787
vendor: nodejs
product: node.js
affected:
  - node.js < 6.14.4
  - 'node.js >= 8.0.0, < 8.11.4'
  - 'node.js >= 10.0.0, < 10.9.0'
  - openshift_container_platform = 3.11
patched:
  - node.js 10.9.0
published: '2018-08-21'
updated: '2026-10-15'
sourceUpdated: '2026-10-15T18:17:11.007'
source: NVD
sourceUrl: 'https://nvd.nist.gov/vuln/detail/CVE-2018-12115'
references:
  - url: 'http://www.securityfocus.com/bid/105127'
    label: cve-request@iojs.org
  - url: 'https://access.redhat.com/errata/RHSA-2018:2552'
    label: cve-request@iojs.org
  - url: 'https://access.redhat.com/errata/RHSA-2018:2553'
    label: cve-request@iojs.org
  - url: 'https://access.redhat.com/errata/RHSA-2018:2944'
    label: cve-request@iojs.org
  - url: 'https://access.redhat.com/errata/RHSA-2018:2949'
    label: cve-request@iojs.org
  - url: 'https://access.redhat.com/errata/RHSA-2018:3537'
    label: cve-request@iojs.org
  - url: 'https://nodejs.org/en/blog/vulnerability/august-2018-security-releases/'
    label: cve-request@iojs.org
  - url: 'https://security.gentoo.org/glsa/202003-48'
    label: cve-request@iojs.org
  - url: 'http://www.securityfocus.com/bid/105127'
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: 'https://access.redhat.com/errata/RHSA-2018:2552'
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: 'https://access.redhat.com/errata/RHSA-2018:2553'
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: 'https://access.redhat.com/errata/RHSA-2018:2944'
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: 'https://access.redhat.com/errata/RHSA-2018:2949'
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: 'https://access.redhat.com/errata/RHSA-2018:3537'
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: 'https://nodejs.org/en/blog/vulnerability/august-2018-security-releases/'
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: 'https://security.gentoo.org/glsa/202003-48'
    label: af854a3a-2127-422b-91ae-364da2661108
tags:
  - nvd
  - cve.org
ssvc:
  exploitation: none
  automatable: 'no'
  technicalImpact: partial
  timestamp: '2026-10-15T17:22:23.692025Z'
epss: 0.07779
epssPercentile: 0.94619
ingestedAt: '2026-10-15T18:23:58.395Z'
---

## Overview

In all versions of Node.js prior to 6.14.4, 8.11.4 and 10.9.0 when used with UCS-2 encoding (recognized by Node.js under the names `'ucs2'`, `'ucs-2'`, `'utf16le'` and `'utf-16le'`), `Buffer#write()` can be abused to write outside of the bounds of a single `Buffer`. Writes that start from the second-to-last position of a buffer cause a miscalculation of the maximum length of the input bytes to be written.

## Affected

- `node.js < 6.14.4`
- `node.js >= 8.0.0, < 8.11.4`
- `node.js >= 10.0.0, < 10.9.0`
- `openshift_container_platform = 3.11`

## Remediation

Upgrade past the affected range:

- `node.js 10.9.0`
