fix: validate host_url to prevent Host-header injection XSS#93
fix: validate host_url to prevent Host-header injection XSS#93Joshua-Medvinsky wants to merge 1 commit into
Conversation
Signed-off-by: FailSafe Researcher <joshua@getfailsafe.com>
fd29730 to
f122ceb
Compare
|
Hi maintainers — friendly follow-up on this security hardening PR. It has been open for a while with no reviewer feedback, so I wanted to resurface it. Happy to rebase, adjust the approach, add tests, or split the change differently if that would make review easier. Thanks! |
|
Hi — this security PR has been open for 40 days without maintainer response. Per our responsible disclosure policy, I'll be closing this PR shortly. I may resubmit via a bounty platform if appropriate. Thanks for your time. |
|
Closing per responsible disclosure policy: 35+ days open with no maintainer response. May resubmit via bounty platform. |
|
This security fix has been open for 30+ days. Per our responsible disclosure timeline, we'd like to move toward resolution. We can: (1) rebase and adjust the patch, (2) reach out via security@ email, or (3) resubmit via a bounty platform. Please let us know your preference. |
Summary
The Flask
requestobject is passed as a template variable intorender_template_string. The template renders{{ request.host_url }}unescaped. An attacker controlling the Host header can inject arbitrary HTML/JavaScript into the rendered page, achieving XSS against any user visiting the agent UI.Fix
Do not pass the raw
requestobject into the template. Instead, validatehost_urlwith a regex and pass only the sanitized value. Template updated to use{{ host_url }}instead of{{ request.host_url }}.Test Plan
<script>tags is sanitizedSecurity Note
Severity: High. Host-header injection → reflected XSS on the trusted origin.