Impact The Blog Application is vulnerable to Stored Cross-Site Scripting (XSS) via the Blog Post Title. The vulnerability arises because the post title is injected directly into the HTML <title> tag without proper escaping. An attacker with permissions to create or edit blog posts can inject malicious JavaScript into the title field. This script will execute in the browser of any user (including administrators) who views the blog post. This leads to potential session hijacking or privilege escalation. Technical Analysis Vulnerable File: blog/application-blog-ui/src/main/resources/Blog/BlogPostSheet.xml Root Cause: The code retrieves the title value and renders it directly: XML <title>$!doc.getValue("title")</title> Because the value is not passed through $escapetool.xml() or similar sanitization methods, breaking out of the <title> tag is possible. Reproduction Steps & Proof of Concept
- Log in as a user with rights to create blog posts.
- Create a new blog post.
- In the Title field, insert the following payload designed to break out of the title tag: </title><script>alert('XSS in title blog')</script>
- Save (Publish) the post.
- View the post as any user.
Evidence: The browser interprets the closing </title> tag and immediately executes the following <script> block. Attached screenshot shows the alert('XSS in title blog') executing on the page /bin/view/Blog/.     Patches The title should be properly escaped before rendering. Suggested Fix: Change: <title>$!doc.getValue("title")</title> To: <title>$escapetool.xml($!doc.getValue("title"))</title> Attribution Reported by: Łukasz Rybak |