Skip to content

Conversation

@holysoles
Copy link
Owner

@holysoles holysoles commented Sep 26, 2025

Problem

If a record contains string data, it will be rendered as HTML, not escaped as expected. This means that zone data is susceptible to XSS attacks.

Example with zonetransfer.me:

image

The record in question:

xss 300 IN TXT "'><script>alert('Boo')</script>"

Background

When Flask configures a Jinja environment, it provides a list of file types that should be "autoescaped". Since the templates used in this project end with .j2, they are not escaped.

Fix

Now by default for this project, all Flask templates will be rendered with the autoescape functionality.

@holysoles holysoles self-assigned this Sep 26, 2025
@holysoles holysoles merged commit 08ac01c into main Sep 26, 2025
6 checks passed
@holysoles holysoles deleted the xss-in-records branch September 26, 2025 21:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants