---
title: "CVE-2017-9228\n    | Ubuntu"
description: Ubuntu is an open source software operating system that runs from the
  desktop, to the cloud, to all your internet connected things.
url: https://ubuntu.com/security/CVE-2017-9228?format=md
keywords: index, follow
---

# CVE-2017-9228

Publication date 24 May 2017

Last updated 25 August 2025

---

Ubuntu priority

**Medium**

[Why this priority?](https://ubuntu.com/security/cves/about#priority )

## Cvss 3 Severity Score

**9.8 · Critical**

[Score breakdown](https://ubuntu.com/security/CVE-2017-9228?format=md#impact-score)

Toggle side navigation

## Description

An issue was discovered in Oniguruma 6.2.0, as used in Oniguruma-mod in
Ruby through 2.4.1 and mbstring in PHP through 7.1.5. A heap out-of-bounds
write occurs in bitset\_set\_range() during regular expression compilation
due to an uninitialized variable from an incorrect state transition. An
incorrect state transition in parse\_char\_class() could create an execution
path that leaves a critical local variable uninitialized until it's used as
an index, resulting in an out-of-bounds write memory corruption.

### From the Ubuntu Security Team

It was discovered that Oniguruma incorrectly handled certain regular
expressions. An attacker could possibly use this issue to obtain
sensitive information, cause a denial of service or execute arbitrary
code.

## Status

Show unmaintained releases

| Package | Ubuntu Release | Status |
| --- | --- | --- |
| libonig | 18.04 LTS bionic | Not affected |
| 17.10 artful | Ignored end of life |
| 17.04 zesty | Ignored end of life |
| 16.10 yakkety | Ignored end of life |
| 16.04 LTS xenial | Fixed 5.9.6-1ubuntu0.1 |
| 14.04 LTS trusty | Fixed 5.9.1-1ubuntu1.1 |
| php5 | 18.04 LTS bionic | Not in release |
| 17.10 artful | Not in release |
| 17.04 zesty | Not in release |
| 16.04 LTS xenial | Not in release |
| 14.04 LTS trusty | Fixed 5.5.9+dfsg-1ubuntu4.22 |
| php7.0 | 18.04 LTS bionic | Not in release |
| 17.10 artful | Not in release |
| 17.04 zesty | Fixed 7.0.22-0ubuntu0.17.04.1 |
| 16.04 LTS xenial | Fixed 7.0.22-0ubuntu0.16.04.1 |
| 14.04 LTS trusty | Not in release |
| php7.1 | 18.04 LTS bionic | Not in release |
| 17.10 artful | Fixed 7.1.8-1ubuntu1 |
| 17.04 zesty | Not in release |
| 16.04 LTS xenial | Not in release |
| 14.04 LTS trusty | Not in release |

---

* [How can I get the fixes?](https://ubuntu.com/security/cves/about#security)
* [What do statuses mean?](https://ubuntu.com/security/cves/about#statuses)
* [Patch details](https://ubuntu.com/security/CVE-2017-9228?format=md#patch-details)

### Patch details

For informational purposes only. We recommend not to cherry-pick updates. [How can I get the fixes?](https://ubuntu.com/security/cves/about#security)

| Package | Patch details |
| --- | --- |
| libonig | * Upstream:   [3b63d12](https://github.com/kkos/oniguruma/commit/3b63d12038c8d8fc278e81c942fa9bec7c704c8b) |
| php5 | * Upstream:   [703be4f](https://github.com/php/php-src/commit/703be4f77e662837b64499b0d046a5c8d06a98b9) |
| php7.0 | * Upstream:   [1c845d2](https://github.com/php/php-src/commit/1c845d295037702d63097e2216b3c5db53f79273) |
| php7.1 | * Upstream:   [1c845d2](https://github.com/php/php-src/commit/1c845d295037702d63097e2216b3c5db53f79273) |

## Severity score breakdown

CVSS version:
CVSS v3.0

**Base score**

9.8 · Critical

* Base metrics

  | Parameter | Value |
  | --- | --- |
  | Attack vector | Network |
  | Attack complexity | Low |
  | Privileges required | None |
  | User interaction | None |
  | Scope | Unchanged |
  | Confidentiality impact | High |
  | Integrity impact | High |
  | Availability impact | High |
* Scores

  | Parameter | Value |
  | --- | --- |
  | Base score | 9.8 · Critical |
  | Exploitability score | - |
  | Impact score | - |

**Vector:** CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

## References

* [MITRE](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-9228)
* [NVD](https://nvd.nist.gov/vuln/detail/CVE-2017-9228)
* [Launchpad](https://launchpad.net/bugs/cve/CVE-2017-9228)
* [Debian](https://security-tracker.debian.org/tracker/CVE-2017-9228)

### Related Ubuntu Security Notices (USN)

+ [USN-3382-1](https://usn.ubuntu.com/USN-3382-1)
+ PHP vulnerabilities
+ 10 August 2017

+ [USN-3382-2](https://usn.ubuntu.com/USN-3382-2)
+ PHP vulnerabilities
+ 18 December 2017

### Other references

* <https://www.cve.org/CVERecord?id=CVE-2017-9228>
