CWE-1280: Access Control Check Implemented After Asset is Accessed
A product's hardware-based access control check occurs after the asset has been accessed.
How it's found
Access Control Check Implemented After Asset is Accessed is typically found by tracing untrusted input from where it enters the system to the point where it is used without the check or neutralization this weakness describes, combining manual code review with dynamic testing.
The product implements a hardware-based access control check. The asset should be accessible only after the check is successful. If, however, this operation is not atomic and the asset is accessed before the check is complete, the security of the system may be compromised.
Vulnerable vs. safe
data_out = 0;
data_out = (grant_access) ? data_in : data_out;assign grant_access = (usr_id == 3'h4) ? 1'b1 : 1'b0;if (!rst_n)elsemodule 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)beginendendmoduledata_out = 0;
assign grant_access = (usr_id == 3'h4) ? 1'b1 : 1'b0;data_out = (grant_access) ? data_in : data_out;if (!rst_n)elsealways @ (posedge clk or negedge rst_n)beginendendmoduleConsequences
- Modify Memory, Read Memory, Modify Application Data, Read Application Data, Gain Privileges or Assume Identity, Bypass Protection Mechanism
Mitigations
- Implementation: Implement the access control check first. Access should only be given to asset if agent is authorized.
Where this fits in a TurboPentest engagement
This weakness is not covered by the automated black-box pentest. IntegSec pentesters cover it in a manual engagement.
Frequently asked questions
What is CWE-1280?
A product's hardware-based access control check occurs after the asset has been accessed.
How do you find Access Control Check Implemented After Asset is Accessed?
Access Control Check Implemented After Asset is Accessed is typically found by tracing untrusted input from where it enters the system to the point where it is used without the check or neutralization this weakness describes, combining manual code review with dynamic testing.
What is the impact of CWE-1280?
Modify Memory, Read Memory, Modify Application Data, Read Application Data, Gain Privileges or Assume Identity, Bypass Protection Mechanism
Does TurboPentest test for Access Control Check Implemented After Asset is Accessed?
This weakness is not covered by the automated black-box pentest. IntegSec pentesters cover it in a manual engagement.
Related CWEs
Written and reviewed by
Michel Chamberland - Founder & CEO, IntegSec
CISSP, OSCP, OSCE, CEH, GIAC, CCSK · 20+ years in offensive security
Michel has spent 20+ years on offensive security teams including IBM X-Force Red and Trustwave SpiderLabs, leading penetration tests, red team engagements, and breach response for Fortune 500 customers. He is the founder of IntegSec and the architect of TurboPentest.
Find these issues before an attacker does
TurboPentest runs an agentic AI pentest against your target and reports findings with proof, from $99 per target.
Start a pentest