Description
DjangoBlog 2.0.0.0 through 2.1.0.0 contains a stored cross-site scripting vulnerability because the class_filter comment sanitizer passes event-handler attributes on span, div, pre and code tags. Authenticated commenters can post a div with autofocus and onfocus attributes, executing script without interaction for every visitor, including administrators.
Affected products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| liangliangyy | DjangoBlog | 2.0.0.0 ≤2.1.0.0 | — |
References
- https://vul.yulun.ac.cn/20261101/djangoblog/
- https://github.com/liangliangyy/DjangoBlog/issues/1030
- https://github.com/liangliangyy/DjangoBlog/blob/55655f236308841e0e83f5b383b1c2056a0fb48c/djangoblog/utils.py#L248-L269
- https://github.com/liangliangyy/DjangoBlog/blob/55655f236308841e0e83f5b383b1c2056a0fb48c/blog/templatetags/blog_tags.py#L138-L141
- https://www.vulncheck.com/advisories/djangoblog-2.0.0.0-through-2.1.0.0-stored-xss-via-comment-sanitizer-class-filter