CWE-1342 Base Incompleto

Information Exposure through Microarchitectural State after Transient Execution

This vulnerability occurs when a CPU fails to completely erase temporary data traces left behind by speculative execution or error recovery processes. These lingering microarchitectural hints can be…

Definición

What is CWE-1342?

This vulnerability occurs when a CPU fails to completely erase temporary data traces left behind by speculative execution or error recovery processes. These lingering microarchitectural hints can be analyzed through side-channels to leak sensitive information.
Modern CPUs use techniques like speculative execution and microcode assists to boost performance. When these operations are canceled or encounter errors, the processor should fully clean up. However, if remnants of these transient computations persist in internal buffers (like load/store queues), they create a measurable change in the chip's hidden state. An attacker can then use timing or other side-channel attacks to infer protected data, such as secrets from other processes or virtual machines. Successful exploitation typically requires three conditions: first, vulnerable code must speculatively access sensitive information, leaving microarchitectural traces. Second, the attacker must be able to trigger the specific CPU exceptions or mis-speculations that create these traces. Finally, the attacker needs a method to observe the state change, often by analyzing cache timing or other hardware resource contention, to slowly reconstruct the leaked data.
Impacto en el mundo real

Real-world CVEs caused by CWE-1342

  • Load value injection in some processors utilizing speculative execution may allow an authenticated user to enable information disclosure via a side-channel with local access.

Cómo lo explotan los atacantes

Ruta del atacante paso a paso

  1. 1

    Faulting loads in a victim domain may trigger incorrect transient forwarding, which leaves secret-dependent traces in the microarchitectural state. Consider this example from [REF-1203].

  2. 2

    Consider the code gadget:

  3. 3

    A processor with this weakness will store the value of untrusted_arg (which may be provided by an attacker) to the stack, which is trusted memory. Additionally, this store operation will save this value in some microarchitectural buffer, e.g. the store queue. In this code gadget, trusted_ptr is dereferenced while the attacker forces a page fault. The faulting load causes the processor to mis-speculate by forwarding untrusted_arg as the (speculative) load result. The processor then uses untrusted_arg for the pointer dereference. After the fault has been handled and the load has been re-issued with the correct argument, secret-dependent information stored at the address of trusted_ptr remains in microarchitectural state and can be extracted by an attacker using a code gadget.

Ejemplo de código vulnerable

Vulnerable C

Consider the code gadget:

Vulnerable C
void call_victim(size_t untrusted_arg) {
  	 *arg_copy = untrusted_arg;
  	 array[**trusted_ptr * 4096];
   }
Ejemplo de código seguro

Secure pseudo

Seguro pseudo
// Validate, sanitize, or use a safe API before reaching the sink.
function handleRequest(input) {
  const safe = validateAndEscape(input);
  return executeWithGuards(safe);
}
What changed: the unsafe sink is replaced (or the input is validated/escaped) so the same payload no longer triggers the weakness.
Lista de prevención

How to prevent CWE-1342

  • Architecture and Design / Requirements Hardware ensures that no illegal data flows from faulting micro-ops exists at the microarchitectural level.
  • Build and Compilation Include instructions that explicitly remove traces of unneeded computations from software interactions with microarchitectural elements e.g. lfence, sfence, mfence, clflush.
Señales de detección

How to detect CWE-1342

SAST High

Ejecuta análisis estático (SAST) sobre el código buscando el patrón inseguro en el flujo de datos.

DAST Moderate

Ejecuta pruebas dinámicas de seguridad de aplicaciones (DAST) contra el endpoint en vivo.

Runtime Moderate

Vigila los logs en tiempo de ejecución para detectar trazas de excepción inusuales, entradas malformadas o intentos de bypass de autorización.

Code review Moderate

Revisión de código: marca cualquier código nuevo que maneje entrada desde esta superficie sin usar los helpers validados del framework.

Auto-corrección de Plexicus

Plexicus detecta automáticamente CWE-1342 y abre un PR de corrección en menos de 60 segundos.

Codex Remedium escanea cada commit, identifica esta debilidad concreta y entrega un pull request listo para revisión con el parche. Sin tickets. Sin traspasos.

Preguntas frecuentes

Frequently asked questions

¿Qué es CWE-1342?

This vulnerability occurs when a CPU fails to completely erase temporary data traces left behind by speculative execution or error recovery processes. These lingering microarchitectural hints can be analyzed through side-channels to leak sensitive information.

¿Qué gravedad tiene CWE-1342?

MITRE no ha publicado una calificación de probabilidad de explotación para esta debilidad. Trátala como de impacto medio hasta que tu modelo de amenazas demuestre lo contrario.

¿Qué lenguajes o plataformas se ven afectados por CWE-1342?

MITRE lists the following affected platforms: Not OS-Specific, Workstation, x86, ARM, Other, Not Technology-Specific, System on Chip.

¿Cómo puedo prevenir CWE-1342?

Hardware ensures that no illegal data flows from faulting micro-ops exists at the microarchitectural level. Include instructions that explicitly remove traces of unneeded computations from software interactions with microarchitectural elements e.g. lfence, sfence, mfence, clflush.

¿Cómo detecta y corrige Plexicus CWE-1342?

El motor SAST de Plexicus detecta la firma de flujo de datos para CWE-1342 en cada commit. Cuando hay coincidencia, nuestro agente Codex Remedium abre un PR de corrección con el código corregido, las pruebas y un resumen de una línea para el revisor.

¿Dónde puedo aprender más sobre CWE-1342?

MITRE publica la definición canónica en https://cwe.mitre.org/data/definitions/1342.html. También puedes consultar la documentación de OWASP y NIST para guías relacionadas.

Listo cuando tú lo estés

Deja de pagar por desarrollador.
Empieza a cerrar el bucle.

Plexicus es el ASPM nativo de IA que escanea, filtra, corrige, pentestea y explica — de forma autónoma. Desarrolladores ilimitados, repos ilimitados, acciones de IA de uso justo. Nivel gratuito real, €269/mo anual cuando estés listo.