The product adds hooks to user-accessible API functions, but it does not properly validate the arguments. This could lead to resultant vulnerabilities.
View on MITRESuch hooks can be used in defensive software that runs with privileges, such as anti-virus or firewall, which hooks kernel calls. When the arguments are not validated, they could be used to bypass the protection scheme or attack the product itself.
Ensure that all arguments are verified, as defined by the API you are protecting.
Drop privileges before invoking such functions, if possible.
No detection method information available for this CWE.
function does not verify that its argument is the proper type, leading to arbitrary memory write
View DetailsCWE-622: Improper Validation of Function Hook Arguments is a Common Weakness Enumeration (CWE) entry maintained by MITRE. The product adds hooks to user-accessible API functions, but it does not properly validate the arguments. This could lead to resultant vulnerabilities. Such hooks can be used in defensive software that runs with privileges, such as anti-virus or firewall, which hooks kernel calls. When the arguments are not validated, they could be used to bypass the protection scheme or attack the product itself.
If exploited, CWE-622 (Improper Validation of Function Hook Arguments) it can compromise Integrity, leading to outcomes such as Unexpected State.
Recommended mitigations for CWE-622 include: Ensure that all arguments are verified, as defined by the API you are protecting. Drop privileges before invoking such functions, if possible.
CWE-622 commonly affects Not Language-Specific. Note that weaknesses are often language-agnostic patterns, so secure coding practices apply broadly.
MITRE documents real CVEs mapped to CWE-622, including CVE-2007-0708, CVE-2006-7160, CVE-2007-1376, CVE-2007-1220 and CVE-2006-4541. You can look up the full details of each CVE, including CVSS scores and remediation guidance, on our CVE Lookup tool.
A CWE (Common Weakness Enumeration) like CWE-622 describes a category of software weakness — the underlying flaw type. A CVE (Common Vulnerabilities and Exposures) identifies a specific, real-world vulnerability in a particular product. In short, a CWE is the kind of mistake, and a CVE is an instance of that mistake being found in software.