CVE-2026-23722 Overview
CVE-2026-23722 is a Reflected Cross-Site Scripting (XSS) vulnerability discovered in WeGIA, a Web Manager for Charitable Institutions. The vulnerability exists in the html/memorando/insere_despacho.php file, where the application fails to properly sanitize or encode user-supplied input via the id_memorando GET parameter before reflecting it into the HTML source. This allows unauthenticated attackers to inject arbitrary JavaScript or HTML into the context of the user's browser session.
Critical Impact
Unauthenticated attackers can inject malicious scripts that execute in victim browsers, potentially leading to session hijacking, credential theft, or unauthorized actions performed on behalf of authenticated users.
Affected Products
- WeGIA versions prior to 3.6.2
- WeGIA Web Manager for Charitable Institutions (all installations using vulnerable versions)
- Systems running html/memorando/insere_despacho.php endpoint
Discovery Timeline
- 2026-01-16 - CVE CVE-2026-23722 published to NVD
- 2026-01-16 - Last updated in NVD database
Technical Details for CVE-2026-23722
Vulnerability Analysis
This Reflected XSS vulnerability (CWE-79) allows attackers to craft malicious URLs containing JavaScript payloads in the id_memorando GET parameter. When a victim clicks such a link, the malicious script executes within their browser session with the same privileges as the legitimate application. The vulnerability is particularly dangerous because it does not require authentication to exploit, meaning any attacker with knowledge of the vulnerable endpoint can target users of the WeGIA system.
The reflected nature of this vulnerability means the payload is not stored on the server but is instead "reflected" back to the user's browser through the server's response. This typically occurs when user input is included in error messages, search results, or other dynamic content without proper encoding.
Root Cause
The root cause of this vulnerability is the failure to properly sanitize or encode user-supplied input in the insere_despacho.php file. The id_memorando GET parameter value is likely reflected directly into a <script> block or HTML attribute context without adequate output encoding. This violates fundamental secure coding practices that require all user input to be treated as untrusted and properly escaped based on the output context (HTML body, attribute, JavaScript, etc.).
Attack Vector
The attack vector is network-based and requires no authentication or special privileges. An attacker crafts a malicious URL containing JavaScript code in the id_memorando parameter and distributes it to potential victims through phishing emails, social media, or other means. When a victim clicks the link while authenticated to the WeGIA application, the malicious script executes with their session context.
The vulnerability manifests when the id_memorando parameter value is reflected into the page response without proper sanitization. This could allow attackers to inject script tags, event handlers, or break out of existing script contexts to execute arbitrary JavaScript. For detailed technical information about this vulnerability, refer to the GitHub Security Advisory.
Detection Methods for CVE-2026-23722
Indicators of Compromise
- Suspicious requests to html/memorando/insere_despacho.php containing JavaScript code or HTML tags in the id_memorando parameter
- URL-encoded script tags or event handlers (e.g., %3Cscript%3E, onerror=, onload=) in GET parameters
- Unusual referrer headers indicating users arrived from external phishing sites
- Web application firewall alerts for XSS attack patterns targeting the WeGIA application
Detection Strategies
- Implement Web Application Firewall (WAF) rules to detect and block XSS payloads in the id_memorando parameter
- Configure intrusion detection systems (IDS) to alert on requests containing common XSS vectors targeting insere_despacho.php
- Review web server access logs for requests to the vulnerable endpoint containing suspicious characters like <, >, ", ', or URL-encoded equivalents
- Deploy browser-based XSS auditors and Content Security Policy (CSP) headers to detect and prevent script execution
Monitoring Recommendations
- Enable detailed logging for all requests to the html/memorando/ directory and monitor for anomalous patterns
- Set up alerts for high volumes of requests to insere_despacho.php from single IP addresses or with unusual parameter values
- Monitor for reports of suspicious behavior from users who may have clicked malicious links
- Track authentication events following visits to the vulnerable endpoint to detect potential session hijacking
How to Mitigate CVE-2026-23722
Immediate Actions Required
- Upgrade WeGIA to version 3.6.2 or later immediately, as this version contains the fix for the vulnerability
- If immediate patching is not possible, consider temporarily disabling access to the html/memorando/insere_despacho.php endpoint
- Implement input validation on the id_memorando parameter at the web server or WAF level to reject requests containing potentially malicious characters
- Deploy Content Security Policy (CSP) headers to mitigate the impact of any successful XSS exploitation
Patch Information
The vulnerability has been fixed in WeGIA version 3.6.2. Organizations should update to this version or later to remediate the vulnerability. The patch likely implements proper input sanitization and output encoding for the id_memorando parameter. For more details, see the GitHub Security Advisory.
Workarounds
- Restrict access to the vulnerable endpoint using web server access controls or firewall rules until patching is complete
- Implement a reverse proxy or WAF rule that validates the id_memorando parameter contains only numeric values
- Train users to be cautious of clicking links to internal applications received via email or external sources
- Enable browser XSS filters and deploy strict CSP headers to reduce the impact of potential exploitation
# Apache configuration example to restrict access to vulnerable endpoint
<Location "/html/memorando/insere_despacho.php">
# Option 1: Restrict to internal network only
Require ip 10.0.0.0/8 192.168.0.0/16
# Option 2: Validate id_memorando contains only digits
RewriteEngine On
RewriteCond %{QUERY_STRING} id_memorando=[^0-9]
RewriteRule .* - [F,L]
</Location>
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.


