CVE-2025-2040 zhijiantianya ruoyi-vue-pro deploy special elements used in a template engine

Medium 5.3 Published Updated

Remote attackers with permissions can execute arbitrary code via template injection in the BPM model deployment endpoint.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Over the internet
Victim action needed
Not needed
Fix
None listed

What is CVE-2025-2040?

CVE-2025-2040 is a medium-severity code injection vulnerability in zhijiantianya ruoyi-vue-pro, published on 6 Mar 2025. Any signed-in user can exploit it over the network, with no action from the victim.

Official description

A vulnerability classified as critical was found in zhijiantianya ruoyi-vue-pro 2.4.1. Affected by this vulnerability is an unknown functionality of the file /admin-api/bpm/model/deploy. The manipulation leads to improper neutralization of special elements used in a template engine. The attack can be launched remotely. The exploit has been disclosed to the public and may be used.

Weakness: CWE-791, CWE-1336

Which versions are affected by CVE-2025-2040?

It affects 1 product.

Products include Iocoder Ruoyi-Vue-Pro.

How do I fix CVE-2025-2040?

No fix has been published for CVE-2025-2040 yet. Limit exposure of the affected software until one is available.

Upgrade, and never evaluate templates, expressions or code built from user input. More about Code injection.

Is CVE-2025-2040 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-2040 exists.

Sources

Also known as GHSA-hv2c-wf43-5v98.

Is CVE-2025-2040 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free