HTML reporter doesn't escape <>& in finding output #3

Open
opened 2026-06-19 06:22:27 -07:00 by drjones · 0 comments
Owner

In engine/reporter.sh, finding evidence and exploit content is inserted directly into HTML without entity escaping. A finding containing <script>alert(1)</script> would execute in the HTML report.

Impact: Only affects the report viewer (internal). Not exploitable in the field since the report is local, but still bad practice.

Fix: Add a html_escape() function that replaces <, >, &, ", ' before inserting into the HTML template.

In `engine/reporter.sh`, finding evidence and exploit content is inserted directly into HTML without entity escaping. A finding containing `<script>alert(1)</script>` would execute in the HTML report. **Impact:** Only affects the report viewer (internal). Not exploitable in the field since the report is local, but still bad practice. **Fix:** Add a `html_escape()` function that replaces `<`, `>`, `&`, `"`, `'` before inserting into the HTML template.
drjones added the bug label 2026-06-19 06:22:27 -07:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: drjones/th-analyzer#3