Uploaded image for project: 'Blog Application'
  1. Blog Application
  2. BLOG-245

Stored XSS in Blog Application home page via Post Title

    XMLWordPrintable

Details

    • Unknown

    Description

      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.

      PoC

      1. Log in as a user with rights to create blog posts.
      2. Create a new blog post.
      3. In the Title field, insert the following payload designed to break out of the title tag: </title><script>alert('XSS in title blog')</script>
      4. Save (Publish) the post.
      5. View the post as any user.

      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 GitHub: https://github.com/lukasz-rybak

      Attachments

        1. image-2025-11-25-01-51-17-127.png
          165 kB
          Łukasz Rybak
        2. image-2025-11-25-01-52-01-351.png
          120 kB
          Łukasz Rybak
        3. image-2025-11-25-01-52-47-545.png
          60 kB
          Łukasz Rybak
        4. image-2025-11-25-01-53-13-166.png
          140 kB
          Łukasz Rybak

        Activity

          People

            tmortagne Thomas Mortagne
            lukasz-rybak Łukasz Rybak
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: