CVE-2024-41810: Python Unescaped Html Dict Format

HTML content is formatted with a dictionary containing potentially unescaped values. If the value comes from user input, this could result in Cross-Site Scripting (XSS) or HTML injection. Apply HTML escaping (`html.escape()`) to the variable before or during interpolation to avoid exposing unescaped data in the presentation layer.

Provally CuratedPublic repositoryMediumMedium confidenceVerifiedApache-2.0Python
greprules fetch cve-2024-41810-python-unescaped-html-dict-format --engine opengrep

Description

HTML content is formatted with a dictionary containing potentially unescaped values. If the value comes from user input, this could result in Cross-Site Scripting (XSS) or HTML injection. Apply HTML escaping (`html.escape()`) to the variable before or during interpolation to avoid exposing unescaped data in the presentation layer.