Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB
CVE-2024-2775 Overview
CVE-2024-2775 is a reflected cross-site scripting (XSS) vulnerability [CWE-79] in Campcodes Online Marriage Registration System 1.0. The flaw exists in /user/user-profile.php, where the lname parameter is rendered without proper output encoding. Remote attackers can craft a malicious URL that executes arbitrary JavaScript in the victim's browser session after user interaction. The exploit has been publicly disclosed under VulDB identifier VDB-257609, increasing the likelihood of opportunistic attacks against exposed installations.
Critical Impact
Successful exploitation enables session hijacking, credential theft via injected forms, and unauthorized actions executed in the context of the authenticated user.
Affected Products
- Campcodes Online Marriage Registration System 1.0
- Component: /user/user-profile.php
- Vulnerable parameter: lname
Discovery Timeline
- 2024-03-21 - CVE-2024-2775 published to NVD
- 2026-06-17 - Last updated in NVD database
Technical Details for CVE-2024-2775
Vulnerability Analysis
The vulnerability resides in the user profile handler of the Online Marriage Registration System. The application accepts the lname (last name) parameter and reflects its value back into the rendered HTML without applying contextual output encoding or input sanitization. An attacker can inject HTML and JavaScript payloads that execute when a victim loads the crafted URL.
The issue is classified as [CWE-79] Improper Neutralization of Input During Web Page Generation. Because the application is a PHP-based web platform intended for authenticated users managing marriage registration records, injected scripts run in the context of the victim's session. Attackers can exfiltrate session cookies, alter displayed content, redirect users to attacker-controlled infrastructure, or perform unauthorized actions on behalf of the victim.
Root Cause
The root cause is the absence of output encoding and input validation on the lname parameter before it is embedded in the HTTP response. PHP functions such as htmlspecialchars() or htmlentities() are not applied, allowing raw HTML markup and <script> tags to be rendered by the browser.
Attack Vector
Exploitation requires an attacker to deliver a crafted URL containing a malicious lname value to a target user, typically through phishing, forum posts, or instant messaging. User interaction is required because the victim must open the link. No authentication or elevated privileges are required by the attacker to craft the payload, though the victim's privileges determine the impact scope. The attack is network-reachable against any exposed deployment of the application.
For technical reproduction details, see the GitHub Vulnerability Report and the VulDB #257609 Analysis.
Detection Methods for CVE-2024-2775
Indicators of Compromise
- HTTP requests to /user/user-profile.php containing lname values with <script>, onerror=, onload=, or encoded equivalents such as %3Cscript%3E.
- Unexpected outbound requests from client browsers to attacker-controlled domains following profile page views.
- Web server access logs showing abnormally long or URL-encoded lname query strings.
Detection Strategies
- Deploy web application firewall (WAF) rules that inspect query and POST parameters for XSS signatures targeting the lname field.
- Enable application-layer logging that captures full request parameters, not just URIs, for forensic review.
- Correlate browser-side Content Security Policy (CSP) violation reports against access to the user profile endpoint.
Monitoring Recommendations
- Monitor authentication and session logs for anomalous session reuse across geographies, which may indicate cookie theft via XSS.
- Alert on access patterns where the same lname payload appears across multiple source IPs, indicating mass phishing distribution.
- Review referer headers to identify external sites directing traffic to the vulnerable endpoint.
How to Mitigate CVE-2024-2775
Immediate Actions Required
- Restrict public exposure of the Online Marriage Registration System 1.0 behind VPN or IP allow-listing until a vendor fix is validated.
- Deploy WAF signatures to block common XSS payloads on the /user/user-profile.php endpoint, specifically filtering the lname parameter.
- Enforce a strict Content Security Policy that disallows inline scripts and restricts script sources to trusted origins.
Patch Information
No official vendor patch is referenced in the NVD entry or associated advisories at the time of publication. Operators should monitor the Campcodes project channels for updates and consider migrating to a maintained alternative if remediation is not forthcoming. Review the VulDB #257609 Details record for ongoing status changes.
Workarounds
- Apply server-side input validation on the lname parameter to reject HTML metacharacters such as <, >, ", and '.
- Modify /user/user-profile.php to pass user-supplied values through htmlspecialchars($value, ENT_QUOTES, 'UTF-8') before output.
- Set HttpOnly and Secure flags on session cookies to limit script-based cookie theft.
- Enable browser X-XSS-Protection and X-Content-Type-Options: nosniff response headers as defense-in-depth.
# Example Apache mod_security rule to block script tags in the lname parameter
SecRule ARGS:lname "@rx (?i)(<script|onerror=|onload=|javascript:)" \
"id:1002775,phase:2,deny,status:403,log,msg:'CVE-2024-2775 XSS attempt on lname'"
# Example response header hardening in Apache
Header always set Content-Security-Policy "default-src 'self'; script-src 'self'"
Header always set X-Content-Type-Options "nosniff"
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB

