Summary
A reflected cross-site scripting (XSS) vulnerability in Key Systems Inc Global Facilities Management Software allows untrusted input passed via the selectgroup and gn parameters on the /?Function=Groups endpoint to be returned to users without proper output encoding.
A remote attacker can leverage this to execute arbitrary JavaScript in a victim's browser when they visit a crafted URL, potentially leading to session theft, account impersonation, or unauthorized actions within the application.
Affected context
The vulnerability occurs in the web interface of Key Systems Inc Global Facilities Management Software (version 20230721a), specifically on the /?Function=Groups endpoint.
It is exposed when user-controlled data from the selectgroup and gn query parameters is embedded in the HTML response without robust context-aware escaping.
The issue is most relevant in deployments where users access the application via a browser and can be induced to follow external links, such as through email, chat messages, or embedded links in other sites.
Exploit preconditions
- Attack surface: Public or internal web interface at the
/?Function=Groupsendpoint. - Required access: Ability to cause a user to load a crafted URL (e.g., via phishing, chat, or malicious web page); direct authentication requirements depend on the deployment but are not a barrier if the victim is already logged in.
- Trigger point: Browser renders the server's HTML/JavaScript response containing unsanitized
selectgrouporgnparameter values. - Why exploitation is possible: The application reflects attacker-controlled input directly into the page without appropriate output encoding or sanitization, allowing injection of active JavaScript in the browser context.
Why this happens
This vulnerability is rooted in improper output encoding of user input before it is incorporated into HTML content, as described by CWE-79: Improper Neutralization of Input During Web Page Generation (Cross-Site Scripting).
Data from the selectgroup and gn parameters is treated as benign text but is inserted into the response in a context where browser parsing rules interpret it as HTML or JavaScript.
Without context-aware escaping (for example, HTML-encoding in element bodies, attribute encoding in attributes, or JavaScript encoding inside script blocks), an attacker's crafted input can break out of the intended structure and introduce executable script.
Potential impact
- Theft or reuse of session identifiers, enabling account impersonation in the application.
- Execution of arbitrary JavaScript in the victim's browser, including keylogging or DOM manipulation.
- Unauthorized actions performed on behalf of the victim (stored changes, configuration updates, or operations within the facilities management system).
- Exfiltration or modification of sensitive data accessible via the user's session, such as facility information or user records.
- Use of the affected application as a pivot to deliver further browser-based attacks (e.g., loading malicious scripts from third-party domains).
General mitigation guidance
Effective mitigation focuses on robust output encoding and reducing trust in client-supplied data:
- Apply strict context-aware output encoding for all user-controlled values, including
selectgroupandgn, based on where they appear in the HTML (element body, attribute, URL, or script). - Centralize HTML encoding routines and templates so that developers consistently handle untrusted data through well-vetted helpers rather than manual concatenation.
- Prefer server-side frameworks and templating engines that auto-escape output by default, only allowing explicit opt-out when safe.
- Validate and normalize incoming parameters to expected patterns (e.g., numeric IDs or constrained group names), rejecting or neutralizing unexpected characters.
- Enforce a least-privilege model for browser-exposed features so that even if an XSS occurs, sensitive operations require additional verification (e.g., re-authentication, step-up checks).
- Consider defense-in-depth controls such as strict Content Security Policy (CSP) to reduce the impact of potential markup injection.
How teams detect issues like this
High-level detection typically involves both code-level and behavior-level analysis:
- Static analysis: Configure linters or SAST tools to flag direct inclusion of request parameters (like
selectgroupandgn) in HTML responses without passing through encoding helpers. - Code review: Examine controller and view/template code for direct string concatenation, inline HTML generation, and bypasses of templating engine auto-escaping, especially around query parameter handling.
- Security testing: Use manual or automated web security scanners to probe for reflected XSS by injecting benign test payloads into parameters and observing whether they are reflected unescaped in responses.
- Policy enforcement: Integrate secure coding guidelines into CI/CD, including mandatory security review for endpoints that render user-controlled data and automated checks for high-risk patterns (raw HTML writes, innerHTML assignments, etc.).

