CVE-2026-50229: Apache Tomcat Example App XSS Vulnerability—Patch Guidance
Apache Tomcat contains a cross-site scripting (XSS) vulnerability in its bundled number-guessing example application. An attacker can inject malicious scripts into web pages served by this example, which execute in the browsers of users who interact with it. This affects multiple Tomcat versions across several release branches. The vulnerability requires user interaction (such as clicking a link) to trigger, and impacts confidentiality and integrity rather than availability.
Source data · NVD / CISA · public domain
- CVSS
- 3.1 · 6.1 MEDIUM · CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
- Weaknesses (CWE)
- CWE-80
- Affected products
- 1 configuration(s)
- Published / Modified
- 2026-06-29 / 2026-07-02
NVD description (verbatim)
Improper Neutralization of Script-Related HTML Tags in a Web Page (Basic XSS) vulnerability in the number guess example for Apache Tomcat. This issue affects Apache Tomcat: from 11.0.0-M1 through 11.0.22, from 10.1.0-M1 through 10.1.55, from 9.0.0.M1 through 9.0.118, from 8.5.0 through 8.5.100, from 7.0.0 through 7.0.109. Other versions that have reached end of support may also be affected. Users are recommended to upgrade to version 11.0.23, 10.1.56 or 9.0.119, which fix the issue.
2 reference(s) · View on NVD →
SEC.co analysis · AI-assisted, reviewed against source
Technical summary
This is a reflected XSS flaw (CWE-80) in Tomcat's example application that fails to properly sanitize user-controlled input before embedding it in HTML responses. The vulnerability exists in the number guessing example component and allows an unauthenticated attacker to craft malicious URLs containing script payloads. When a victim visits such a URL, the injected JavaScript executes in their browser context with the privileges of the current user session, potentially enabling session hijacking, credential theft, or defacement.
Business impact
Organizations running Tomcat with example applications enabled in production environments face a direct risk of account compromise and data exfiltration. Even in development or testing environments, this can be an entry point for lateral movement or supply chain attacks if those systems are networked with production infrastructure. The vulnerability is particularly concerning in shared hosting or multi-tenant scenarios where example applications may inadvertently remain accessible.
Affected systems
Vulnerable versions span multiple Tomcat release lines: 11.0.0-M1 through 11.0.22, 10.1.0-M1 through 10.1.55, 9.0.0-M1 through 9.0.118, 8.5.0 through 8.5.100, and 7.0.0 through 7.0.109. Versions 11.0.23, 10.1.56, and 9.0.119 contain the fix. End-of-life branches (7.x and 8.5.x) receive no further updates, making patching impossible for organizations constrained to those versions.
Exploitability
This vulnerability has a CVSS 3.1 score of 6.1 (Medium severity) with a network-based attack vector requiring no authentication but mandating user interaction. Exploitation is straightforward—an attacker crafts a URL and tricks or socially engineers a user into visiting it. No special tools or significant technical barriers exist; basic HTML/JavaScript knowledge suffices. The vulnerability is not listed in CISA's KEV catalog, suggesting no active widespread exploitation has been formally documented, though the low barrier to exploitation means defensive action should not be delayed.
Remediation
Upgrade to patched versions: 11.0.23 or later for the 11.x branch, 10.1.56 or later for 10.1.x, or 9.0.119 or later for 9.0.x. For organizations on 8.5.x or 7.x branches that have reached end-of-support, immediate migration to a supported version is essential. As an interim mitigation, disable or remove example applications from all Tomcat instances, especially those accessible over the network. Verify via application inventories and network scans that example directories are not exposed.
Patch guidance
Apply vendor updates as specified: consult the Apache Tomcat security advisory for exact patch availability and installation procedures for your specific version. Test patched versions in a staging environment mirroring production configuration before production deployment. For unsupported branches (7.x, 8.5.x), upgrade the entire Tomcat installation to a supported version. Document patch application and removal of example applications as part of your change management process.
Detection guidance
Monitor web server logs for suspicious patterns in HTTP requests targeting example application paths (typically /examples/ or similar). Look for URL-encoded or obfuscated script tags, angle brackets, or JavaScript keywords in GET/POST parameters. Implement Web Application Firewall (WAF) rules to block requests containing <script>, javascript:, onerror=, and other XSS payloads sent to Tomcat instances. Conduct regular scanning of Tomcat servers to identify whether example applications remain deployed and accessible from the network.
Why prioritize this
Although rated Medium severity, this vulnerability warrants prompt attention because: (1) exploitation is trivial and requires only social engineering, (2) it affects multiple actively-supported Tomcat branches, (3) example applications are often overlooked in security assessments, and (4) compromise of web application users can cascade into broader infrastructure breaches. Organizations should prioritize patching or removal of examples within their next patch cycle.
Risk score, explained
The CVSS 3.1 score of 6.1 reflects the network attack vector, lack of authentication requirement, and low attack complexity, balanced against the requirement for user interaction and limited impact scope (confidentiality and integrity, not availability). The score appropriately captures the risk as moderate rather than critical, but organizations handling sensitive data or operating in regulated industries may wish to treat it with higher priority.
Frequently asked questions
Do we need to remove example applications even after patching?
Yes. Best practice is to remove all example applications from production Tomcat instances regardless of patch status. Example code is not part of the core server functionality and creates unnecessary attack surface. If examples must remain in development or testing, isolate those instances from production networks and restrict access via firewall rules.
Are versions 7.x and 8.5.x fixable, or must we upgrade Tomcat entirely?
Versions 7.x and 8.5.x have reached end-of-support and will not receive patches. If your organization is constrained to these versions, you must upgrade to Tomcat 9.0.119 or later, or implement strict network isolation and removal of example applications as compensating controls. Plan a migration timeline immediately.
How can we detect if someone has exploited this vulnerability against us?
Review web server access logs for 4xx responses (especially 404 errors) when accessing /examples/ paths, and look for unusual parameter values containing encoded HTML or JavaScript. Enable detailed request logging in Tomcat's AccessLogValve and correlate with intrusion detection system alerts. Check for suspicious session activity and user account access patterns around the time of potential exploitation.
What is the difference between this example-app XSS and XSS vulnerabilities in real applications?
This XSS affects Tomcat's bundled sample code, not the core server. However, it demonstrates why input validation is critical—real applications must apply the same sanitization principles. Organizations should review their own web applications for similar XSS patterns, particularly in user input handling and output encoding.
This analysis is provided for informational purposes to support vulnerability management and risk assessment. It does not constitute professional legal, security, or compliance advice. Organizations must verify all patch version numbers and compatibility against official Apache Tomcat security advisories and their own system configurations before applying updates. SEC.co makes no warranties regarding the completeness or accuracy of this intelligence and recommends consulting with your security team and vendor support for environment-specific guidance. Exploit code or weaponized proof-of-concept techniques are not provided herein. Source: NVD (public-domain), retrieved 2026-08-08. Analysis generated by SEC.co (claude-haiku-4-5).
Related vulnerabilities
- CVE-2025-62198MEDIUMApache Atlas XSS Vulnerability – Exploitation, Patch & Detection
- CVE-2026-34033MEDIUMApache Answer XSS in Notification Emails – Vulnerability Explainer
- CVE-2025-36321MEDIUMIBM watsonx.data Intelligence HTML Injection Vulnerability
- CVE-2025-71331MEDIUMFlowise XSS Vulnerability in Chat Messages and Agent Functions
- CVE-2026-7380MEDIUMXSS Vulnerability in Armiya GKS Access Control System
- CVE-2026-11511LOWBolt CMS HTML Injection Vulnerability – Unsupported Software Risk
- CVE-2026-12812LOWRadware Cyber Controller HTML Injection Vulnerability – Patch Guidance
- CVE-2026-46492HIGHXSS in md-fileserver Markdown Rendering