CVE-2026-7045 Dynamic-Datasource has an Injection vulnerability

Medium 5.3 Published Updated

Remote attackers can execute arbitrary code via SpEL injection in the dynamic-datasource library's datasource determination logic.

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-2026-7045?

CVE-2026-7045 is a medium-severity code injection vulnerability in baomidou dynamic-datasource, published on 26 Apr 2026. Any signed-in user can exploit it over the network, with no action from the victim.

Official description

A vulnerability was determined in baomidou dynamic-datasource 2.5.0. Affected by this vulnerability is the function DsSpelExpressionProcessor#doDetermineDatasource of the file dynamic-datasource-spring/src/main/java/com/baomidou/dynamic/datasource/processor/DsSpelExpressionProcessor.java of the component StandardEvaluationContext/SpelExpressionParser. This manipulation causes injection. The attack may be initiated remotely. Patch name: 273fcedaee984c08197c0890f14190b86ab7e0b8. It is recommended to apply a patch to fix this issue.

Weakness: CWE-74, CWE-707

Which versions are affected by CVE-2026-7045?

2 open source packages ship an affected version, including com.baomidou:dynamic-datasource-spring.

PackageAffectedFixed in
com.baomidou:dynamic-datasource-spring MavenAll versions to 4.5.0None
com.baomidou:dynamic-datasource-spring MavenAll versions to 4.5.0None

How do I fix CVE-2026-7045?

No fix has been published for CVE-2026-7045 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-2026-7045 being exploited?

There is no known exploitation of CVE-2026-7045 in the wild and no public exploit code.

Sources

Also known as GHSA-6rmm-pg23-5f8q.

Is CVE-2026-7045 in your software?

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

Check your SBOMs for free