---
id: CVE-2018-20998
aliases:
  - RUSTSEC-2018-0011
  - GHSA-69fv-gw6g-8ccg
title: Enum repr causing potential memory corruption
summary: Enum repr causing potential memory corruption
severity: critical
cvss: 9.8
cvssVector: 'CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H'
vendor: arrayfire
product: arrayfire
ecosystem: rust
affected:
  - 'arrayfire >= 0.0.0-0, < 3.6.0'
patched:
  - arrayfire 3.6.0
published: '2018-12-18'
updated: '2026-09-25'
sourceUpdated: '2026-09-25T14:45:02.994347923Z'
source: OSV
sourceUrl: 'https://osv.dev/vulnerability/RUSTSEC-2018-0011'
references:
  - url: 'https://crates.io/crates/arrayfire'
  - url: 'https://rustsec.org/advisories/RUSTSEC-2018-0011.html'
  - url: 'https://github.com/arrayfire/arrayfire-rust/pull/177'
tags:
  - osv
  - rust
epss: 0.01658
epssPercentile: 0.75624
ingestedAt: '2026-09-26T07:17:57.338Z'
---

## Overview

The attribute repr() added to enums to be compatible with C-FFI caused
memory corruption on MSVC toolchain.

arrayfire crates <= version 3.5.0 do not have this issue when used with
Rust versions 1.27 or earlier. The issue only started to appear since
Rust version 1.28.

The issue seems to be interlinked with which version of Rust is being used.

The issue was fixed in crate 3.6.0.

## Affected packages

- `arrayfire >= 0.0.0-0, < 3.6.0`

## Remediation

Upgrade to a patched release:

- `arrayfire 3.6.0`
