# CVE-2018-16981: mame: stb stb_image.h 2.19, as used in catimg, Emscripten, and other products, has a heap-based buffer overflow in the stbi...

CVE-2018-16981 is fixed in 3 products on 1 platform, first by mame 0.195+dfsg.1-2ubuntu0.1~esm1, released June 23, 2022. It is not reported as exploited. Patch Radar priority: Routine.

- Web page: https://patchblox.com/security/cve/CVE-2018-16981
- Priority: Routine
- CVSS: n/a (Medium)
- EPSS: 0.0159
- CISA KEV: not listed
- Exploited (vendor report): no
- Publicly disclosed: no
- Published: Sep 12, 2018

## Description

stb stb_image.h 2.19, as used in catimg, Emscripten, and other products, has a heap-based buffer overflow in the stbi__out_gif_code function.

## Where it's fixed

| Platform | Product | Fixed in | Fix | Released |
|---|---|---|---|---|
| Linux | mame Ubuntu 18.04.6 LTS (bionic) | 0.195+dfsg.1-2ubuntu0.1~esm1 | [mame 0.195+dfsg.1-2ubuntu0.1~esm1](https://patchblox.com/security/data/fix/linux/ubuntu-bionic-mame-0.195-dfsg.1-2ubuntu0.1-esm1.md) | Jun 23, 2022 |
| Linux | mame Ubuntu 20.04 LTS (focal) | 0.220+dfsg.1-1ubuntu0.1~esm1 | [mame 0.220+dfsg.1-1ubuntu0.1~esm1](https://patchblox.com/security/data/fix/linux/ubuntu-focal-mame-0.220-dfsg.1-1ubuntu0.1-esm1.md) | Jun 23, 2022 |
| Linux | mame Ubuntu 22.04.1 LTS (jammy) | 0.242+dfsg.1-1ubuntu0.1~esm1 | [mame 0.242+dfsg.1-1ubuntu0.1~esm1](https://patchblox.com/security/data/fix/linux/ubuntu-jammy-mame-0.242-dfsg.1-1ubuntu0.1-esm1.md) | Jun 23, 2022 |
| Linux | mame Ubuntu 24.04.5 LTS (noble) | 0.264+dfsg.1-1ubuntu0.1~esm1 | [mame 0.264+dfsg.1-1ubuntu0.1~esm1](https://patchblox.com/security/data/fix/linux/ubuntu-noble-mame-0.264-dfsg.1-1ubuntu0.1-esm1.md) | Jun 23, 2022 |
| Linux | mame Ubuntu 25.10 (questing) | 0.277+dfsg.1-4ubuntu0.1 | [mame 0.277+dfsg.1-4ubuntu0.1](https://patchblox.com/security/data/fix/linux/ubuntu-questing-mame-0.277-dfsg.1-4ubuntu0.1.md) | Jun 23, 2022 |
| Linux | mame-data Ubuntu 18.04.6 LTS (bionic) | 0.195+dfsg.1-2ubuntu0.1~esm1 | [mame-data 0.195+dfsg.1-2ubuntu0.1~esm1](https://patchblox.com/security/data/fix/linux/ubuntu-bionic-mame-data-0.195-dfsg.1-2ubuntu0.1-esm1.md) | Jun 23, 2022 |
| Linux | mame-data Ubuntu 20.04 LTS (focal) | 0.220+dfsg.1-1ubuntu0.1~esm1 | [mame-data 0.220+dfsg.1-1ubuntu0.1~esm1](https://patchblox.com/security/data/fix/linux/ubuntu-focal-mame-data-0.220-dfsg.1-1ubuntu0.1-esm1.md) | Jun 23, 2022 |
| Linux | mame-data Ubuntu 22.04.1 LTS (jammy) | 0.242+dfsg.1-1ubuntu0.1~esm1 | [mame-data 0.242+dfsg.1-1ubuntu0.1~esm1](https://patchblox.com/security/data/fix/linux/ubuntu-jammy-mame-data-0.242-dfsg.1-1ubuntu0.1-esm1.md) | Jun 23, 2022 |
| Linux | mame-data Ubuntu 24.04.5 LTS (noble) | 0.264+dfsg.1-1ubuntu0.1~esm1 | [mame-data 0.264+dfsg.1-1ubuntu0.1~esm1](https://patchblox.com/security/data/fix/linux/ubuntu-noble-mame-data-0.264-dfsg.1-1ubuntu0.1-esm1.md) | Jun 23, 2022 |
| Linux | mame-data Ubuntu 25.10 (questing) | 0.277+dfsg.1-4ubuntu0.1 | [mame-data 0.277+dfsg.1-4ubuntu0.1](https://patchblox.com/security/data/fix/linux/ubuntu-questing-mame-data-0.277-dfsg.1-4ubuntu0.1.md) | Jun 23, 2022 |
| Linux | mame-tools Ubuntu 18.04.6 LTS (bionic) | 0.195+dfsg.1-2ubuntu0.1~esm1 | [mame-tools 0.195+dfsg.1-2ubuntu0.1~esm1](https://patchblox.com/security/data/fix/linux/ubuntu-bionic-mame-tools-0.195-dfsg.1-2ubuntu0.1-esm1.md) | Jun 23, 2022 |
| Linux | mame-tools Ubuntu 20.04 LTS (focal) | 0.220+dfsg.1-1ubuntu0.1~esm1 | [mame-tools 0.220+dfsg.1-1ubuntu0.1~esm1](https://patchblox.com/security/data/fix/linux/ubuntu-focal-mame-tools-0.220-dfsg.1-1ubuntu0.1-esm1.md) | Jun 23, 2022 |
| Linux | mame-tools Ubuntu 22.04.1 LTS (jammy) | 0.242+dfsg.1-1ubuntu0.1~esm1 | [mame-tools 0.242+dfsg.1-1ubuntu0.1~esm1](https://patchblox.com/security/data/fix/linux/ubuntu-jammy-mame-tools-0.242-dfsg.1-1ubuntu0.1-esm1.md) | Jun 23, 2022 |
| Linux | mame-tools Ubuntu 24.04.5 LTS (noble) | 0.264+dfsg.1-1ubuntu0.1~esm1 | [mame-tools 0.264+dfsg.1-1ubuntu0.1~esm1](https://patchblox.com/security/data/fix/linux/ubuntu-noble-mame-tools-0.264-dfsg.1-1ubuntu0.1-esm1.md) | Jun 23, 2022 |
| Linux | mame-tools Ubuntu 25.10 (questing) | 0.277+dfsg.1-4ubuntu0.1 | [mame-tools 0.277+dfsg.1-4ubuntu0.1](https://patchblox.com/security/data/fix/linux/ubuntu-questing-mame-tools-0.277-dfsg.1-4ubuntu0.1.md) | Jun 23, 2022 |

---

Data as of 2026-11-08T00:53:09Z UTC. Source: Patchblox Patch Radar (https://patchblox.com/security/patch-radar). Patchblox finds out-of-date software on Windows, macOS and Linux and updates it through release rings: https://patchblox.com/demo

Free to use with attribution: show "Data: Patchblox Patch Radar" with a link to https://patchblox.com/security/patch-radar. Terms, including what needs a written agreement: https://patchblox.com/security/patch-radar/use-the-data

Product names, logos and trademarks shown on Patch Radar belong to their respective owners. They are used only to identify the software each security fix applies to and to help readers find their platform. Their use does not imply any affiliation with, or endorsement by, those owners, and Patchblox is not affiliated with any of them.
