Führe statische Analyse (SAST) auf der Codebasis aus und suche im Datenfluss nach dem unsicheren Muster.
Access Control Check Implemented After Asset is Accessed
This vulnerability occurs when a hardware-based security check runs after the protected resource has already been accessed, creating a dangerous timing window.
What is CWE-1280?
Real-world CVEs caused by CWE-1280
Bisher sind in MITREs Katalog keine öffentlichen CVE-Referenzen mit dieser CWE verknüpft.
Angreiferpfad Schritt für Schritt
- 1
Assume that the module foo_bar implements a protected register. The register content is the asset. Only transactions made by user id (indicated by signal usr_id) 0x4 are allowed to modify the register contents. The signal grant_access is used to provide access.
- 2
This code uses Verilog blocking assignments for data_out and grant_access. Therefore, these assignments happen sequentially (i.e., data_out is updated to new value first, and grant_access is updated the next cycle) and not in parallel. Therefore, the asset data_out is allowed to be modified even before the access control check is complete and grant_access signal is set. Since grant_access does not have a reset value, it will be meta-stable and will randomly go to either 0 or 1.
- 3
Flipping the order of the assignment of data_out and grant_access should solve the problem. The correct snippet of code is shown below.
Vulnerable Verilog
Assume that the module foo_bar implements a protected register. The register content is the asset. Only transactions made by user id (indicated by signal usr_id) 0x4 are allowed to modify the register contents. The signal grant_access is used to provide access.
module foo_bar(data_out, usr_id, data_in, clk, rst_n);
output reg [7:0] data_out;
input wire [2:0] usr_id;
input wire [7:0] data_in;
input wire clk, rst_n;
wire grant_access;
always @ (posedge clk or negedge rst_n)
begin
```
if (!rst_n)
data_out = 0;
else
data_out = (grant_access) ? data_in : data_out;
assign grant_access = (usr_id == 3'h4) ? 1'b1 : 1'b0;
end
endmodule Secure Verilog
Flipping the order of the assignment of data_out and grant_access should solve the problem. The correct snippet of code is shown below.
always @ (posedge clk or negedge rst_n)
begin
```
if (!rst_n)
data_out = 0;
else
assign grant_access = (usr_id == 3'h4) ? 1'b1 : 1'b0;
data_out = (grant_access) ? data_in : data_out;
end
endmodule How to prevent CWE-1280
- Implementation Implement the access control check first. Access should only be given to asset if agent is authorized.
How to detect CWE-1280
Führe dynamische Application-Security-Tests gegen den Live-Endpoint aus.
Beobachte Runtime-Logs auf ungewöhnliche Exception-Traces, fehlerhafte Eingaben oder Versuche, Autorisierung zu umgehen.
Code Review: Markiere jeden neuen Code, der Eingaben von dieser Oberfläche ohne validierte Framework-Helper verarbeitet.
Plexicus erkennt CWE-1280 automatisch und öffnet in unter 60 Sekunden einen Fix-PR.
Codex Remedium scannt jeden Commit, identifiziert genau diese Schwachstelle und liefert einen reviewer-ready Pull Request mit dem Patch. Keine Tickets. Keine Hand-offs.
Frequently asked questions
Was ist CWE-1280?
This vulnerability occurs when a hardware-based security check runs after the protected resource has already been accessed, creating a dangerous timing window.
Wie gravierend ist CWE-1280?
MITRE hat für diese Schwachstelle keine Exploit-Wahrscheinlichkeit veröffentlicht. Behandle sie als mittlere Auswirkung, bis dein Threat Model anderes belegt.
Welche Sprachen oder Plattformen sind von CWE-1280 betroffen?
MITRE lists the following affected platforms: Verilog, VHDL, Not OS-Specific, Not Architecture-Specific, Not Technology-Specific.
Wie kann ich CWE-1280 verhindern?
Implement the access control check first. Access should only be given to asset if agent is authorized.
Wie erkennt und behebt Plexicus CWE-1280?
Die SAST-Engine von Plexicus erkennt die Datenfluss-Signatur von CWE-1280 bei jedem Commit. Bei einem Treffer öffnet unser Codex-Remedium-Agent einen Fix-PR mit korrigiertem Code, Tests und einer einzeiligen Zusammenfassung für den Reviewer.
Wo erfahre ich mehr über CWE-1280?
MITRE veröffentlicht die kanonische Definition unter https://cwe.mitre.org/data/definitions/1280.html. Für ergänzende Hinweise kannst du auch die OWASP- und NIST-Dokumentation heranziehen.
Weaknesses related to CWE-1280
Incorrect Behavior Order
This weakness occurs when a system executes multiple dependent actions in the wrong sequence, leading to unexpected and potentially…
DMA Device Enabled Too Early in Boot Phase
This vulnerability occurs when a device with Direct Memory Access (DMA) capability is activated before the system's security settings are…
Power-On of Untrusted Execution Core Before Enabling Fabric Access Control
This vulnerability occurs when a system powers up hardware components containing untrusted firmware before establishing critical security…
Cryptographic Operations are run Before Supporting Units are Ready
This vulnerability occurs when cryptographic processes start before their required dependencies are properly initialized and ready to…
Incorrect Behavior Order: Early Validation
This vulnerability occurs when an application validates user input before applying security filters or data normalization. Attackers can…
Incorrect Behavior Order: Early Amplification
This vulnerability occurs when a system allows a user to trigger a resource-intensive operation before verifying their identity or…
Incorrect Behavior Order: Authorization Before Parsing and Canonicalization
This vulnerability occurs when a web server checks access permissions before fully processing and normalizing a URL, potentially allowing…
Further reading
Schluss mit dem Bezahlen pro Entwickler.
Schließ den Kreislauf.
Plexicus ist die KI-native ASPM, die scannt, filtert, fixt, pentestet und erklärt — autonom. Unbegrenzte Entwickler, unbegrenzte Repos, Fair-Use-KI-Aktionen. Echter kostenloser Tarif, €269/mo jährlich, wenn du bereit bist.