/

CVE-2026-33135

Severity:

CRITICAL RISK

(9.3)

Cross-Site Scripting (Reflected XSS) in WeGIA

CVE-2026-33135

Analyzed

Vulnerability type

Category:

Cross-Site Scripting (Reflected XSS)

CWE:

CWE-79

Impact:

Client-Side Code Execution / Session Compromise

Severity:

CRITICAL RISK

(9.3)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

WeGIA versions 3.6.6 and below contain a reflected cross-site scripting (XSS) vulnerability in the novo_memorandoo.php endpoint, where user-controlled data is echoed into HTML without encoding.

By crafting a malicious link that injects JavaScript via the sccs GET parameter, an attacker can execute arbitrary code in the victim's browser when they visit the link.

Affected context

The vulnerability exists in the WeGIA web interface for managing memorandums, specifically in /html/memorando/novo_memorandoo.php.

It is exposed when the application uses the msg and sccs GET parameters to display dynamic success messages and directly concatenates sccs into an HTML alert <div> without escaping.

Risk is present whenever users can be induced to click links or follow redirects to this endpoint containing untrusted content in the sccs parameter.

Exploit preconditions

  • Attack surface: HTTP GET requests to /html/memorando/novo_memorandoo.php
  • Required access: Ability to cause a victim to load a crafted URL (e.g., via email, chat, or embedded links); no prior authentication may be required beyond what the application normally uses
  • Trigger point: The server-side logic checks if $_GET['msg'] == 'success' and then reflects $_GET['sccs'] inside an HTML alert <div> in the response
  • Why exploitation is possible: The sccs parameter is treated as trusted content and injected into the HTML response without output encoding or sanitization, allowing attacker-supplied JavaScript to run in the victim's browser

Why this happens

This issue stems from directly embedding untrusted GET parameter values into an HTML response without proper output encoding.

The novo_memorandoo.php script uses $_GET['sccs'] to build a success message inside an HTML <div> when $_GET['msg'] equals 'success', but does not apply context-appropriate escaping before concatenation.

This aligns with CWE-79, where improper neutralization of input in the browser context allows attackers to inject script content into web pages viewed by other users.

Potential impact

  • Execution of arbitrary JavaScript in the context of the affected WeGIA application
  • Theft of session identifiers, CSRF tokens, or other sensitive data accessible to the page
  • Unauthorized actions performed on behalf of the victim via script-driven requests
  • Defacement of application content or injection of misleading UI elements
  • Potential pivoting to other attacks, such as credential harvesting or delivering browser-based malware

General mitigation guidance

Effective mitigation focuses on robust output encoding and careful handling of user-supplied data in HTML templates:

  • Apply context-aware escaping (e.g., HTML entity encoding) to any data derived from request parameters before inserting it into the DOM.
  • Use a templating system or framework helpers that automatically encode variables, reducing the chance of direct string concatenation.
  • Restrict which fields can contain HTML, and default to treating all user input as plain text.
  • Validate and constrain the shape and length of display parameters like sccs to expected formats (e.g., fixed messages or enumerated codes).
  • Avoid constructing HTML strings manually; instead, map simple status codes to predefined, server-side message templates.

How teams detect issues like this

Organizations can identify similar vulnerabilities by:

  • Static analysis rules that flag direct echoing or concatenation of $_GET/$_POST/$_REQUEST variables into HTML output without encoding.
  • Code review checklists that specifically examine alert, notification, and status-message rendering for unescaped parameters.
  • Security-focused linting or SAST tools configured to detect potential CWE-79 patterns in PHP code.
  • Automated testing with fuzzing or XSS payload dictionaries against endpoints that reflect request parameters in the response.

Sources

SourceLink
github.comgithub.com/LabRedesCefetRJ/WeGIA/pull/1459
github.comgithub.com/LabRedesCefetRJ/WeGIA/releases/tag/3.6.7
github.comgithub.com/LabRedesCefetRJ/WeGIA/security/advisories/GHSA-w5rv-5884-w94v

Frequently asked

questions

Yes. An attacker can exploit it remotely by sending or embedding a crafted URL that includes a malicious sccs parameter, causing code execution in the victim's browser when the link is opened.

The attacker primarily needs the ability to deliver a malicious link to a user of the WeGIA application. If the targeted page is accessible without special privileges, no additional access is required beyond the victim's normal session.

Replace any direct output of request parameters with context-appropriate encoding, and where possible, map status indicators (like msg and sccs) to server-side enumerated messages instead of reflecting arbitrary strings from the client.

Adopt a consistent output encoding strategy, rely on framework or templating features that escape by default, limit where dynamic HTML is allowed, and integrate security-focused code reviews and automated scanners that flag unescaped user input in views.

Find out what's already
exploitable in your codebase.