CWE-587: Assignment of a Fixed Address to a Pointer
The product sets a pointer to a specific address other than NULL or 0.
How it's found
Assignment of a Fixed Address to a Pointer is a specific, narrowly defined instance of a broader pattern. Testers confirm it with targeted code review and a proof-of-concept input that exercises the exact code path this weakness describes.
Using a fixed address is not portable, because that address will probably not be valid in all environments or platforms.
Consequences
- Execute Unauthorized Code or Commands: If one executes code at a known location, an attacker might be able to inject code there beforehand.
- DoS: Crash, Exit, or Restart, Reduce Maintainability, Reduce Reliability: If the code is ported to another platform or environment, the pointer is likely to be invalid and cause a crash.
- Read Memory, Modify Memory: The data at a known pointer location can be easily read or influenced by an attacker.
Mitigations
- Implementation: Never set a pointer to a fixed address.
Where this fits in a TurboPentest engagement
TurboPentest's agentic pentest is powerful and covers a broad range of issues automatically. This particular class is best confirmed in a manual IntegSec engagement, where human pentesters apply deeper methodology and a larger context window than any automated pass.
Frequently asked questions
What is CWE-587?
The product sets a pointer to a specific address other than NULL or 0.
How do you find Assignment of a Fixed Address to a Pointer?
Assignment of a Fixed Address to a Pointer is a specific, narrowly defined instance of a broader pattern. Testers confirm it with targeted code review and a proof-of-concept input that exercises the exact code path this weakness describes.
What is the impact of CWE-587?
Execute Unauthorized Code or Commands: If one executes code at a known location, an attacker might be able to inject code there beforehand. DoS: Crash, Exit, or Restart, Reduce Maintainability, Reduce Reliability: If the code is ported to another platform or environment, the pointer is likely to be invalid and cause a crash. Read Memory, Modify Memory: The data at a known pointer location can be easily read or influenced by an attacker.
Does TurboPentest test for Assignment of a Fixed Address to a Pointer?
TurboPentest's agentic pentest is powerful and covers a broad range of issues automatically. This particular class is best confirmed in a manual IntegSec engagement, where human pentesters apply deeper methodology and a larger context window than any automated pass.
Related CWEs
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 $99 pentest