Skip to content

[Precogs Alert] Cross-site Scripting (XSS) detected (CWE-79, Risk: Critical)#2

Open
sameer6pre wants to merge 1 commit intomainfrom
Precogs-fix-ybgowews
Open

[Precogs Alert] Cross-site Scripting (XSS) detected (CWE-79, Risk: Critical)#2
sameer6pre wants to merge 1 commit intomainfrom
Precogs-fix-ybgowews

Conversation

@sameer6pre
Copy link
Copy Markdown
Owner

Vulnerability Details

  • File Path: Python-Projects/.github/scripts/convert_to_html_tables.py
  • Vulnerability Type: Cross-site Scripting (XSS)
  • Risk Level: Critical

Explanation:
The script reads contributors data from .github/data/contributors-log.json and directly formats values (project title, contributor names, pull request identifiers, and demo_path) into HTML using Python f-strings without any escaping or validation. Those strings are then written into index.md as HTML table cells and anchor tags. If an attacker can control or modify the JSON content (via a pull request, compromised contributor data, or another pipeline input), they can craft payloads that break out of attribute contexts or use dangerous URL schemes (e.g., javascript:) to execute arbitrary JavaScript when the resulting index.md is rendered. The code does not perform HTML-escaping for attributes or visible content, nor does it validate URL schemes or PR identifiers, enabling multiple practical XSS injection vectors.

Please review and address the issue accordingly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant