CWE-1222 Variant Incomplete

Insufficient Granularity of Address Regions Protected by Register Locks

This vulnerability occurs when a hardware design uses a single lock bit to protect a large, coarse block of memory addresses. This lack of granularity creates a conflict: the system needs to lock…

Definition

What is CWE-1222?

This vulnerability occurs when a hardware design uses a single lock bit to protect a large, coarse block of memory addresses. This lack of granularity creates a conflict: the system needs to lock critical configuration settings early for security, but software also needs to write to other parts of that same address region during normal operation, which the lock incorrectly prevents.
In many systems, a trusted boot process (like the BIOS or bootloader) sets a hardware lock bit to permanently freeze critical configuration registers, preventing malware or errors from altering them later. This lock typically protects an entire predefined address region, not individual registers. However, if this protected region is too large and not finely segmented, it becomes a security and functionality trade-off. Setting the lock too early can block legitimate software from updating necessary settings within that same region, while not setting it leaves the system vulnerable. Fixing this conflict after manufacturing requires a hardware redesign, as the lock granularity is baked into the silicon.
Real-world impact

Real-world CVEs caused by CWE-1222

No public CVE references are linked to this CWE in MITRE's catalog yet.

How attackers exploit it

Step-by-step attacker path

  1. 1

    Identify a code path that handles untrusted input without validation.

  2. 2

    Craft a payload that exercises the unsafe behavior — injection, traversal, overflow, or logic abuse.

  3. 3

    Deliver the payload through a normal request and observe the application's reaction.

  4. 4

    Iterate until the response leaks data, executes attacker code, or escalates privileges.

Vulnerable code example

Vulnerable Other

For example, consider a hardware unit with a 32 kilobyte configuration address space where the first 8 kilobyte address contains security sensitive controls that must only be writable by device bootloader. One way to protect the security configuration could be to define a 32 bit system configuration locking register (SYS_LOCK) where each bit lock locks the corresponding 1 kilobyte region.

Vulnerable Other
| Address | Register | 
| --- | --- |
| 0x0000 | SYS_LOCK: 32 bit system configuration lock register, each bit is write-1-once  |
| 0x0004 | SECURITY_FEATURE_ENABLE: 32 bit register controlling enabling of security features  |
| ... |    |
| 0x0310 | SW_MODE: 32 bit Software Mode indication register   |

  | Address region | Lock bit | 
| --- | --- |
| 0x0000 - 0x03FF | SYS_LOCK[0]  |
| 0x0400 - 0x07FF | SYS_LOCK[1]  |
| ... |    |
| 0x7C00 - 0x7FFF | SYS_LOCK[31]  |
Secure code example

Secure pseudo

Secure 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.
Prevention checklist

How to prevent CWE-1222

  • Architecture and Design The defining of protected locked registers should be reviewed or tested early in the design phase with software teams to ensure software flows are not blocked by the security locks. As an alternative to using register lock control bits and fixed access control regions, the hardware design could use programmable security access control configuration so that device trusted firmware can configure and change the protected regions based on software usage and security models.
Detection signals

How to detect CWE-1222

SAST High

Run static analysis (SAST) on the codebase looking for the unsafe pattern in the data flow.

DAST Moderate

Run dynamic application security testing against the live endpoint.

Runtime Moderate

Watch runtime logs for unusual exception traces, malformed input, or authorization bypass attempts.

Code review Moderate

Code review: flag any new code that handles input from this surface without using the validated framework helpers.

Plexicus auto-fix

Plexicus auto-detects CWE-1222 and opens a fix PR in under 60 seconds.

Codex Remedium scans every commit, identifies this exact weakness, and ships a reviewer-ready pull request with the patch. No tickets. No hand-offs.

Frequently asked questions

Frequently asked questions

What is CWE-1222?

This vulnerability occurs when a hardware design uses a single lock bit to protect a large, coarse block of memory addresses. This lack of granularity creates a conflict: the system needs to lock critical configuration settings early for security, but software also needs to write to other parts of that same address region during normal operation, which the lock incorrectly prevents.

How serious is CWE-1222?

MITRE has not published a likelihood-of-exploit rating for this weakness. Treat it as medium-impact until your threat model proves otherwise.

What languages or platforms are affected by CWE-1222?

MITRE lists the following affected platforms: Not OS-Specific, Not Architecture-Specific, System on Chip.

How can I prevent CWE-1222?

The defining of protected locked registers should be reviewed or tested early in the design phase with software teams to ensure software flows are not blocked by the security locks. As an alternative to using register lock control bits and fixed access control regions, the hardware design could use programmable security access control configuration so that device trusted firmware can configure and change the protected regions based on software usage and security models.

How does Plexicus detect and fix CWE-1222?

Plexicus's SAST engine matches the data-flow signature for CWE-1222 on every commit. When a match is found, our Codex Remedium agent opens a fix PR with the corrected code, tests, and a one-line summary for the reviewer.

Where can I learn more about CWE-1222?

MITRE publishes the canonical definition at https://cwe.mitre.org/data/definitions/1222.html. You can also reference OWASP and NIST documentation for adjacent guidance.

Ready when you are

Don't Let Security
Weigh You Down.

Stop choosing between AI velocity and security debt. Plexicus is the only platform that runs Vibe Coding Security and ASPM in parallel — one workflow, every codebase.