CVE-2026-7045 Dynamic-Datasource has an Injection vulnerability
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.
Which versions are affected by CVE-2026-7045?
2 open source packages ship an affected version, including com.baomidou:dynamic-datasource-spring.
| Package | Affected | Fixed in |
|---|---|---|
com.baomidou:dynamic-datasource-spring Maven | All versions to 4.5.0 | None |
com.baomidou:dynamic-datasource-spring Maven | All versions to 4.5.0 | None |
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.