Skip to content

Stored Cross-Site Scripting (XSS) via DNS Record Poisoning

Moderate
yogeshojha published GHSA-96q4-fj2m-jqf7 Aug 16, 2024

Package

reNgine

Affected versions

<= 2.1.2

Patched versions

2.1.3

Description

Summary

I have discovered a vulnerability in a rengine that is susceptible to Stored Cross-Site Scripting (XSS) attacks. This vulnerability occurs when scanning a domain, and if the target domain's DNS record contains an XSS payload, it leads to the execution of malicious scripts in the rengine's dashboard view when any user views the scan results.

The XSS payload is directly fetched from the DNS record of the remote target domain. Consequently, an attacker can execute the attack without requiring any additional input from the target or the rengine user.

Details

An attacker can create a malicious DNS TXT record (and others) on their DNS management that contains the XSS payload. If anyone attempts to scan that attacker's domain using the rengine tools, the malicious DNS record will be stored in the rengine tools and executed when the user tries to open the "vulnerability result" tab of the attacker's domain.

PoC

  1. Login to the Rengine Application
  2. Go to the 'Quick Add' -> 'Target'
  3. Add domain "x.0x90.in" (For PoC I have used my Domain)(Domain Should Configure before scanning follow below DNS record and add in domain DNS)
  4. Do a 'Vulnerability Scan'
  5. Wait for Scan for Finished.
  6. Go to Result -> Vulnerability Tab and View all vulnerability. Cross Site Scripting(XSS) will Execute in Front End.

// Add a TXT DNS record on the Domain(Which want to Scan beforre scaaning start)
"{"Test<img src=x onerror=alert(document.domain)>":1}" {{ '<script>alert(3)</script>' | safe }}

Impact

The impact of this vulnerability is significant and can have severe consequences. By exploiting this vulnerability, an attacker can inject and execute arbitrary scripts within the context of the rengine. This allows them to perform various malicious actions, including but not limited to:

  • Stealing sensitive information. I am able to use ajax call to fetch internal data and send response to the attacker's system via http call.
  • Defacing the tool's user interface, displaying offensive or misleading content.
  • Phishing attacks by redirecting users to malicious websites.
  • Leveraging the tool's capabilities for further attacks on the local network or other vulnerable systems.

Severity

Moderate

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Network
Attack complexity
High
Privileges required
None
User interaction
Required
Scope
Unchanged
Confidentiality
Low
Integrity
Low
Availability
Low

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:L

CVE ID

CVE-2024-43381

Credits