CWEweakness

CWE-1038 Insecure Automated Optimizations

Low Official page ↗
Abstraction
Class
Structure
Simple
Status
Draft
Likelihood of exploit
Low
Languages
Not Language-Specific
CWE version
5.0

Description

The product uses a mechanism that automatically optimizes code, e.g. to improve a characteristic such as performance, but the optimizations can have an unintended side effect that might violate an intended security assumption.

Common consequences

• Integrity: Alter Execution Logic — The optimizations alter the order of execution resulting in side effects that were not intended by the original developer.

Observed examples

• CVE-2017-5715: Intel, ARM, and AMD processor optimizations related to speculative execution and branch prediction cause access control checks to be bypassed when placing data into the cache. Often known as "Spectre". • CVE-2008-1685: C compiler optimization, as allowed by specifications, removes code that is used to perform checks to detect integer overflows.

Related

Observed example · CVE (2)

  • CVE-2017-5715 Systems with microprocessors utilizing speculative execution and indirect branch prediction may allow unauthorized disclosure of… vulnerability
  • CVE-2008-1685 gcc 4.2.0 through 4.3.0 in GNU Compiler Collection, when casts are not used, considers the sum of a pointer and an int to be greater than… vulnerability

Child of · CWE (2)

  • CWE-435 Improper Interaction Between Multiple Correctly-Behaving Entities weakness
  • CWE-758 Reliance on Undefined, Unspecified, or Implementation-Defined Behavior weakness

Referenced by CVE · weakness (6)

  • CVE-2025-48877 Discourse is an open-source discussion platform. vulnerability
  • CVE-2023-52969 MariaDB Server 10.4 through 10.5.*, 10.6 through 10.6.*, 10.7 through 10.11.*, and 11.0 through 11.0.* can sometimes crash with an empty… vulnerability
  • CVE-2023-52970 MariaDB Server 10.4 through 10.5.*, 10.6 through 10.6.*, 10.7 through 10.11.*, 11.0 through 11.0.*, and 11.1 through 11.4.* crashes in… vulnerability
  • CVE-2023-52971 MariaDB Server 10.10 through 10.11.* and 11.0 through 11.4.* crashes in JOIN::fix_all_splittings_in_plan. vulnerability
  • CVE-2022-31220 Dell BIOS versions contain an Unchecked Return Value vulnerability. vulnerability
  • CVE-2022-26861 Dell BIOS versions contain an Insecure Automated Optimization vulnerability. vulnerability

Referenced by CWE · child of (2)

  • CWE-1037 Processor Optimization Removal or Modification of Security-critical Code weakness
  • CWE-733 Compiler Optimization Removal or Modification of Security-critical Code weakness