# CVE-2023-29827: ejs - RCE

> Live exploitation tracking for CVE-2023-29827 by the CrowdSec Live Exploit Tracker, built from real-world attack data crowdsourced from CrowdSec's global network.

Page: https://tracker.crowdsec.net/cves/CVE-2023-29827

## Key facts

- **Exploitation phase:** Limited Exploitation. The vulnerability is known but shows very limited attacker interest or exploitation activity.
- **CVSS score:** 9.8
- **Public exploit available:** Yes
- **Affected products:** ejs
- **Weaknesses:** CWE-74 (Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection'))
- **Tags:** javascript

## Description

ejs v3.1.9 is vulnerable to server-side template injection. If the ejs file is controllable, template injection can be implemented through the configuration settings of the closeDelimiter parameter. NOTE: this is disputed by the vendor because the render function is not intended to be used with untrusted input.

## CrowdSec analysis

[CVE-2023-29827](https://euvd.enisa.europa.eu/vulnerability/CVE-2023-29827) is a vulnerability in ejs v3.1.9 allows for server-side template injection if an attacker can control the EJS file and manipulate the closeDelimiter parameter. This flaw could potentially be exploited for remote code execution (RCE), enabling attackers to run arbitrary code on the server. However, the vendor disputes the risk, noting that the render function is not intended for use with untrusted input.

CrowdSec has been tracking this vulnerability and its exploits since 30th of June 2025.

Data from the CrowdSec community indicates that exploitation of CVE-2023-29827 is highly selective and intelligence-driven. Threat actors use advanced reconnaissance and carefully choose their targets, often as part of sophisticated campaigns or advanced persistent threat operations.
CrowdSec network telemetry also shows that exploitation of CVE-2023-29827 has significantly declined over the past week. Attack volumes are well below the long-term average, suggesting attackers are rapidly losing interest. The vulnerability appears to be falling out of active use across most threat landscapes.

Attackers exploit this vulnerability by injecting malicious JavaScript code into the `settings[view options][closeDelimiter]` parameter of the `/page` endpoint, enabling remote code execution via EJS template injection.

## Timeline

- 2023-05-04: CVE Published. CVE-2023-29827 is published to NVD.
- 2025-06-30: Rule Released. CrowdSec releases a rule to detect CVE-2023-29827 exploitation attempts against the CrowdSec Network.
- 2025-07-08: CrowdSec First Seen. CrowdSec observes in-the-wild exploitation of CVE-2023-29827 for the first time.

## References

- https://github.com/mde/ejs/issues/720
- https://github.com/mde/ejs/blob/main/SECURITY.md#out-of-scope-vulnerabilities

## Live exploitation data

The [Live Exploit Tracker page](https://tracker.crowdsec.net/cves/CVE-2023-29827) follows observed exploitation activity for CVE-2023-29827. [Request an API key](https://tracker.crowdsec.net/request-api-key) for full access to its exploitation timeline, attacking IP addresses and blocklists.
