Description
html-janitor node module suffers from an External Control of Critical State Data vulnerability via user-control of the '_sanitized' variable causing sanitization to be bypassed.
html-janitor node module suffers from an External Control of Critical State Data vulnerability via user-control of the '_sanitized' variable causing sanitization to be bypassed.
| Vendor | Product | Version | Platform |
|---|---|---|---|
| theguardian | html-janitor | 2.0.2 | node.js |
CWE-642 External Control of Critical State Data
The product stores security-critical state information about its users, or the product itself, in a location that is accessible to unauthorized actors.
If an attacker can modify the state information without detection, then it could be used to perform unauthorized actions or access unexpected resources, since the application programmer does not expect that the state can be changed. State information can be stored in various locations such as a cookie, in a hidden web form field, input parameter or argument, an environment variable, a database record, within a settings file, etc. All of these locations have the potential to be modified by an attacker. When this state information is used to control security or determine resource usage, then it may create a vulnerability. For example, an application may perform authentication, then save the state in an authenticated=true cookie. An attacker may simply create this cookie in order to bypass the authentication.
| Scope | Impact |
|---|---|
| Access Control | Bypass Protection Mechanism, Gain Privileges or Assume Identity An attacker could potentially modify the state in malicious ways. If the state is related to the privileges or level of authentication that the user has, then state modification might allow the user to bypass authentication or elevate privileges. |
| Confidentiality | Read Application Data The state variables may contain sensitive information that should not be known by the client. |
| Availability | DoS: Crash, Exit, or Restart By modifying state variables, the attacker could violate the application's expectations for the contents of the state, leading to a denial of service due to an unexpected error condition. |
All 15 CWE-642 CVEs, with trend and prevention
Source: MITRE CWE catalog · cwe.mitre.org