CWE-462

Duplicate Key in Associative List (Alist)

Medium

Description

Duplicate keys in associative lists can lead to non-unique keys being mistaken for an error.

Potential Impact

How to Fix

Architecture and Design

Use a hash table instead of an alist.

Architecture and Design

Use an alist which checks the uniqueness of hash keys with each entry before inserting the entry.

Related Weaknesses

References

View on MITRE CWE Database →

Need Help Fixing This Vulnerability?

Our security experts can help you identify and remediate CWE-462 vulnerabilities in your codebase.

Get Security Assessment