Description
Python's elementtree C accelerator failed to initialise Expat's hash salt during initialization. This could make it easy to conduct denial of service attacks against Expat by constructing an XML document that would cause pathological hash collisions in Expat's internal data structures, consuming large amounts CPU and RAM. The vulnerability exists in Python versions 3.7.0, 3.6.0 through 3.6.6, 3.5.0 through 3.5.6, 3.4.0 through 3.4.9, 2.7.0 through 2.7.15.
Vulnerability type
CWE-909
Missing Initialization of Resource
The product does not initialize a critical resource.
Impact on systems
| Scope | Impact |
| Other |
Varies by Context If a resource is not initialized, it could contain unpredictable or expired data, or it could be initialized to defaults that are invalid. This can have security implications when the resource is expected to have certain properties or values. |
| Confidentiality |
Read Memory, Read Application Data When reusing a resource such as memory or a program variable, the original contents of that resource may not be cleared before it is sent to an untrusted party. |
| Availability |
DoS: Crash, Exit, or Restart The uninitialized resource may contain values that cause program flow to change in ways that the programmer did not intend. |
How to prevent it
Implementation
Explicitly initialize the resource before use. If this is performed through an API function or standard procedure, follow all specified steps.
Implementation
Pay close attention to complex conditionals that affect initialization, since some branches might not perform the initialization.
Implementation
Avoid race conditions (CWE-362) during initialization routines.
Build and Compilation
Run or compile your product with settings that generate warnings about uninitialized variables or data.
All 94 CWE-909 CVEs, with trend and prevention