CWE-1384: Improper Handling of Physical or Environmental Conditions
The product does not properly handle unexpected physical or environmental conditions that occur naturally or are artificially induced.
How it's found
Improper Handling of Physical or Environmental Conditions describes a general pattern rather than a single fixed bug. Testers use a mix of static analysis and manual code review to find where a target's code matches this pattern, then confirm exploitability by hand.
Hardware products are typically only guaranteed to behave correctly within certain physical limits or environmental conditions. Such products cannot necessarily control the physical or external conditions to which they are subjected. However, the inability to handle such conditions can undermine a product's security. For example, an unexpected physical or environmental condition may cause the flipping of a bit that is used for an authentication decision. This unexpected condition could occur naturally or be induced artificially by an adversary. Physical or environmental conditions of concern are:Atmospheric characteristics:extreme temperature ranges, etc. Interference:electromagnetic interference (EMI), radio frequency interference (RFI), etc. Assorted light sources:white light, ultra-violet light (UV), lasers, infrared (IR), etc. Power variances:under-voltages, over-voltages, under-current, over-current, etc. Clock variances:glitching, overclocking, clock stretching, etc. Component aging and degradation Materials manipulation:focused ion beams (FIB), etc. Exposure to radiation:x-rays, cosmic radiation, etc.
Vulnerable vs. safe
load_runtime_firmware();
do_not_load_runtime_firmware();...if (signature_matches) // <-Glitch Here{}else{}...If the underlying hardware detects a voltage or clock glitch, the information can be used to prevent the glitch from being successful.Consequences
- Varies by Context, Unexpected State: Consequences of this weakness are highly dependent on the role of affected components within the larger product.
Mitigations
- Requirements: In requirements, be specific about expectations for how the product will perform when it exceeds physical and environmental boundary conditions, e.g., by shutting down.
- Architecture and Design/Implementation: Where possible, include independent components that can detect excess environmental conditions and have the capability to shut down the product.
- Architecture and Design/Implementation: Where possible, use shielding or other materials that can increase the adversary's workload and reduce the likelihood of being able to successfully trigger a security-related failure.
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-1384?
The product does not properly handle unexpected physical or environmental conditions that occur naturally or are artificially induced.
How do you find Improper Handling of Physical or Environmental Conditions?
Improper Handling of Physical or Environmental Conditions describes a general pattern rather than a single fixed bug. Testers use a mix of static analysis and manual code review to find where a target's code matches this pattern, then confirm exploitability by hand.
What is the impact of CWE-1384?
Varies by Context, Unexpected State: Consequences of this weakness are highly dependent on the role of affected components within the larger product.
Does TurboPentest test for Improper Handling of Physical or Environmental Conditions?
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