Incomplete String Escaping in URL Handling (Potential Security Vulnerability) #6565
Labels
Status: Triage
Needs to be verified, categorized, etc
Type: Bug / Error
Something isn't working or is incorrect
Description
Certain instances in the codebase use .replace() to escape special characters like ( and ) in URLs, but they fail to escape existing backslashes () first. This can lead to malformed escape sequences or introduce security vulnerabilities, especially in downstream parsing or rendering.
Example:
This does not escape backslashes already present in the string. If a URL contains something like (, the output becomes ambiguous or unsafe.
Steps to reproduce
This issue is surfaced through static analysis (e.g., CodeQL), not through typical diagram rendering. However, to conceptually reproduce:
Screenshots
Not applicable, but CodeQL flags it with:
"Incomplete string escaping or encoding"
Code Sample
Setup
Suggested Solutions
Additional Context
No response
The text was updated successfully, but these errors were encountered: