/

CVE-2026-120348

Severity:

HIGH RISK

(7.3)

Code Injection (CWE-94) in XunRuiCMS Email Templates

CVE-2026-120348

Deferred

Vulnerability type

Category:

Code Injection

CWE:

CWE-74, CWE-94

Impact:

Potential remote code execution

Severity:

HIGH RISK

(7.3)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

CVE-2026-120348 is a code injection vulnerability in the email template rendering component of XunRuiCMS, involving the _get_tpl_content function. A remote attacker may be able to cause unintended code execution if they can reach the affected rendering path and supply input that is interpreted as code.

CVE-2026-120348 is a code injection vulnerability in the email template rendering component of XunRuiCMS, involving the _get_tpl_content function. A remote attacker may be able to cause unintended code execution if they can reach the affected rendering path and supply input that is interpreted as code.

Affected context

The vulnerability is reported in the Email Template Rendering component, in dayrui/Fcms/Library/Notice.php, within the _get_tpl_content function. It affects XunRuiCMS versions up to 4.7.4. Risk depends on whether an attacker can remotely reach the relevant rendering functionality and influence content or data handled by it.

The vulnerability is reported in the Email Template Rendering component, in dayrui/Fcms/Library/Notice.php, within the _get_tpl_content function. It affects XunRuiCMS versions up to 4.7.4. Risk depends on whether an attacker can remotely reach the relevant rendering functionality and influence content or data handled by it.

Exploit preconditions

  • Attack surface: A remotely reachable application path that invokes email template rendering
  • Required access: The description does not specify whether authentication or particular privileges are required
  • Trigger point: Processing or rendering content through _get_tpl_content
  • Why exploitation is possible: Input may be handled in a way that allows injected content to be interpreted as code
  • Attack surface: A remotely reachable application path that invokes email template rendering
  • Required access: The description does not specify whether authentication or particular privileges are required
  • Trigger point: Processing or rendering content through _get_tpl_content
  • Why exploitation is possible: Input may be handled in a way that allows injected content to be interpreted as code

Why this happens

The reported issue is code injection (CWE-94), with CWE-74 also associated. This class of flaw occurs when application data is incorporated into code or an interpreted expression without adequate separation or controls. The available description identifies the affected function but does not specify the exact unsafe construction or input source.

The reported issue is code injection (CWE-94), with CWE-74 also associated. This class of flaw occurs when application data is incorporated into code or an interpreted expression without adequate separation or controls. The available description identifies the affected function but does not specify the exact unsafe construction or input source.

Potential impact

  • An attacker may be able to execute code in the application context
  • Application data or email-related operations could be exposed or altered
  • A compromised application process could be used to access resources available to it
  • An attacker may be able to execute code in the application context
  • Application data or email-related operations could be exposed or altered
  • A compromised application process could be used to access resources available to it

General mitigation guidance

Defensive approaches typically focus on preventing data from being interpreted as executable code.

Common patterns include:

  • Use template engines and rendering APIs that treat supplied values as data by default
  • Avoid dynamic evaluation or executable template constructs for untrusted content
  • Apply context-appropriate encoding and strict validation to externally influenced values
  • Restrict access to template modification and rendering functions
  • Run the application with least privilege and limit access to sensitive resources

Defensive approaches typically focus on preventing data from being interpreted as executable code.

Common patterns include:

  • Use template engines and rendering APIs that treat supplied values as data by default
  • Avoid dynamic evaluation or executable template constructs for untrusted content
  • Apply context-appropriate encoding and strict validation to externally influenced values
  • Restrict access to template modification and rendering functions
  • Run the application with least privilege and limit access to sensitive resources

How teams detect issues like this

High-level detection approaches include:

  • Static analysis for dynamic evaluation, unsafe template compilation, and code-generation patterns involving externally influenced data
  • Code review of template rendering paths, especially where values are concatenated into executable expressions
  • Policy checks that restrict executable template features and require safe rendering APIs
  • Review of relevant application logs for unexpected rendering errors or suspicious requests

High-level detection approaches include:

  • Static analysis for dynamic evaluation, unsafe template compilation, and code-generation patterns involving externally influenced data
  • Code review of template rendering paths, especially where values are concatenated into executable expressions
  • Policy checks that restrict executable template features and require safe rendering APIs
  • Review of relevant application logs for unexpected rendering errors or suspicious requests

Sources

SourceLink
github.comgithub.com/tiranbge/disclosure-xunruicms-4.7.2/blob/master/reports/1.md
vuldb.comvuldb.com/cve/CVE-2026-120348
vuldb.comvuldb.com/submit/1016298
vuldb.comvuldb.com/vuln/429672
vuldb.comvuldb.com/vuln/429672/cti

Frequently asked

questions

The report says the attack can be initiated remotely. Successful exploitation depends on whether the attacker can reach the affected rendering path and influence its inputs.

The available description does not state whether authentication or specific privileges are required.

Keep untrusted values as data rather than executable template logic, and avoid unsafe dynamic evaluation during rendering.

Use safe-by-default template APIs, restrict who can modify templates, review data flow into rendering functions, and enforce static analysis and code review policies.

The report says the attack can be initiated remotely. Successful exploitation depends on whether the attacker can reach the affected rendering path and influence its inputs.

The available description does not state whether authentication or specific privileges are required.

Keep untrusted values as data rather than executable template logic, and avoid unsafe dynamic evaluation during rendering.

Use safe-by-default template APIs, restrict who can modify templates, review data flow into rendering functions, and enforce static analysis and code review policies.

Find out what's already
exploitable in your codebase.