CVE Vulnerabilities

CVE-2023-26303

Improper Handling of Alternate Encoding

Published: Feb 23, 2023 | Modified: Nov 21, 2024
CVSS 3.x
5.5
MEDIUM
Source:
NVD
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
CVSS 2.x
RedHat/V2
RedHat/V3
5.5 MODERATE
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
Ubuntu
MEDIUM

Denial of service could be caused to markdown-it-py, before v2.2.0, if an attacker was allowed to force null assertions with specially crafted input.

Weakness

The product does not properly handle when an input uses an alternate encoding that is valid for the control sphere to which the input is being sent.

Affected Software

Name Vendor Start Version End Version
Markdown-it-py Executablebooks * 2.2.0 (excluding)
Markdown-it-py Ubuntu devel *
Markdown-it-py Ubuntu kinetic *
Markdown-it-py Ubuntu lunar *
Markdown-it-py Ubuntu mantic *
Markdown-it-py Ubuntu noble *
Markdown-it-py Ubuntu oracular *
Markdown-it-py Ubuntu trusty *
Markdown-it-py Ubuntu upstream *
Markdown-it-py Ubuntu xenial *

Potential Mitigations

  • Assume all input is malicious. Use an “accept known good” input validation strategy, i.e., use a list of acceptable inputs that strictly conform to specifications. Reject any input that does not strictly conform to specifications, or transform it into something that does.
  • When performing input validation, consider all potentially relevant properties, including length, type of input, the full range of acceptable values, missing or extra inputs, syntax, consistency across related fields, and conformance to business rules. As an example of business rule logic, “boat” may be syntactically valid because it only contains alphanumeric characters, but it is not valid if the input is only expected to contain colors such as “red” or “blue.”
  • Do not rely exclusively on looking for malicious or malformed inputs. This is likely to miss at least one undesirable input, especially if the code’s environment changes. This can give attackers enough room to bypass the intended validation. However, denylists can be useful for detecting potential attacks or determining which inputs are so malformed that they should be rejected outright.

References