CVE-2025-66438CWE-1336CWE-94code-injection

CVE-2025-66438

High · published December 15, 2025

CVSS v3.1
8.8
EPSS
1%
Percentile
41.9
In the wild
Unconfirmed
What it is

🚨 An authenticated user can exploit an SSTI flaw that sneaks through the Print Format rendering! This vulnerability could leak sensitive database information — and it’s mind-blowingly simple to pull off! 🔥 Think of this like a sneaky chef who can add hidden ingredients to recipes in a restaurant. If the chef has permission to change the menu, they can slip in extra spices (or malicious code) that end up serving up confidential secret sauce to anyone who orders the dish! An attacker who can create or modify a Print Format can inject Jinja expressions that lead to disastrous information disclosure from the database. This could potentially expose critical details like database version, schema information, or sensitive values that your organization has worked hard to protect. This vulnerability could lay bare the blueprints of your entire database!

Put simply

Think of this like a sneaky chef who can add hidden ingredients to recipes in a restaurant. If the chef has permission to change the menu, they can slip in extra spices (or malicious code) that end up serving up confidential secret sauce to anyone who orders the dish! This Server-Side Template Injection vulnerability in Frappe ERPNext (up to version 15.89.0) allows authenticated users with Print Format privileges to inject arbitrary Jinja expressions through the rendering mechanism. Despite being sandboxed, functions like frappe.db.sql can still be accessed through get_safe_globals(), opening the door to unauthorized data exposure.

What to do

An attacker who can create or modify a Print Format can inject Jinja expressions that lead to disastrous information disclosure from the database. This could potentially expose critical details like database version, schema information, or sensitive values that your organization has worked hard to protect. This vulnerability could lay bare the blueprints of your entire database! Immediately patch your Frappe ERPNext installation to the latest version where this vulnerability has been addressed. Additionally, review user permissions and restrict access to Print Format creation and modification functionality. Regular audits can help ensure that only authorized users have these capabilities. 🛡️ You've got this! Follow these steps, and you’ll have your defenses back up and running in no time! 🦸‍♂️✨

The record
Technical detail
CVSS v3.1
8.8 · HIGH
Vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
CVSS v4.0
Not supplied
EPSS
0.00500 · 41.9th percentile
Weaknesses
CWE-1336 · Improper Neutralization of Special Elements Used in a Template Engine; CWE-94 · Improper Control of Generation of Code ('Code Injection')
Published
2025-12-15T23:15Z
Affected products (1)
ProductVersionsFixed in
frappe/erpnext≤ 15.89.0—
References (2)
EPSS history
Timeline
  • 15 DEC 00:00Z
    A Server-Side Template Injection (SSTI) vulnerability exists in the Frappe ERPNext through 15.89.0 Print Format rendering mechanism
    cvelistv5