Skip to main content

baomidou dynamic-datasource EUVDEUVD-2026-25722

| CVE-2026-7045 MEDIUM
Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection') (CWE-74)
2026-04-26 VulDB
5.3
CVSS 4.0 · Vendor: VulDB
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Authenticate to application
  2. Delivery
    Submit datasource selection parameter
  3. Exploit
    Inject SpEL expression in parameter
  4. Execution
    Expression evaluated by DsSpelExpressionProcessor
  5. Persist
    Arbitrary code executed as app user
  6. Impact
    System compromised

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Input neutralization, injection prevention
Exploitation Conditions

An attacker must be authenticated to the application and have access to functionality that influences datasource selection through the DsSpelExpressionProcessor. Specifically, the attacker must be able to supply or control input that is passed to the SpEL evaluation context - this typically occurs in applications using baomidou dynamic-datasource's @DS annotation or routing mechanism where the datasource name or selection expression is derived from request parameters, user input, or configuration. The vulnerability does not apply to applications using static or hardcoded datasource names. Additionally, the attacker must understand the application's SpEL expression syntax and available classes in the evaluation context. The exploit requires no special network configuration or non-default settings beyond having dynamic-datasource enabled with user-influenced routing logic.

Impact

The CVSS 6.3 score (AV:N/AC:L/PR:L/UI:N/S:U) reflects moderate risk with network accessibility but mandatory authentication (PR:L). The attack complexity is low, meaning the exploit is straightforward once authenticated. However, the authentication requirement significantly reduces real-world exploitation likelihood compared to unauthenticated vulnerabilities. EPSS data is not provided, limiting probabilistic assessment of widespread exploitation. No CISA KEV listing is indicated, and no public POC is documented, suggesting this is not currently targeted in the wild. The primary limiting factor is the PR:L (requires authenticated/logged-in user) constraint - this is not a default-configuration remote code execution vector but rather a privilege-escalation or insider-threat scenario. Organizations running dynamic-datasource 2.5.0 in environments where untrusted users have application access face elevated risk; isolated backend systems with controlled user bases face lower practical risk despite the technical severity.

Exploit ScenarioDerived

An authenticated application user with access to functionality that accepts datasource selection parameters crafts a malicious SpEL expression (e.g., T(java.lang.Runtime).getRuntime().exec('command')) and submits it through the application interface. The DsSpelExpressionProcessor evaluates this expression without sanitization, executing the embedded command with the application server's privileges. This could allow data exfiltration, further system compromise, or lateral movement depending on the application's runtime environment.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.1% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Apr 26, 2026

SpEL expression injection in baomidou dynamic-datasource 2.5.0 allows authenticated remote attackers to execute arbitrary code via the DsSpelExpressionProcessor component. The vulnerability stems from unsafe evaluation of Spring Expression Language (SpEL) in datasource routing logic, enabling attackers with application access to inject malicious expressions that execute with application privileges. No public exploit code or active exploitation has been identified at time of analysis, though upstream fix is available.

RemediationAI

Apply the upstream patch released by baomidou via the commit 273fcedaee984c08197c0890f14190b86ab7e0b8 (GitHub pull request #767). Users should upgrade to a version that includes this commit, which is available from the baomidou/dynamic-datasource GitHub repository (https://github.com/baomidou/dynamic-datasource). If an immediate upgrade is not feasible, restrict application access to trusted users only and disable dynamic datasource routing features that rely on user-supplied SpEL expressions. Additionally, implement input validation and whitelisting for any datasource selection criteria before they are passed to the SpEL evaluator. Monitor application logs for suspicious SpEL expressions or unexpected datasource routing behavior. Contact baomidou maintainers or check GitHub releases for the specific patched version number, as the remediation data does not specify the exact release version containing the fix.

Affected VersionsENISA

dynamic-datasource 2.5.0

Affected Packages

maven com.baomidou:dynamic-datasource-spring no fix
euvd dynamic_datasource no fix

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 2 packages in maven, euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

baomidou dynamic-datasource is a Java library that provides dynamic database routing for Spring applications using SpEL expressions to determine the target datasource at runtime. The vulnerability exists in the DsSpelExpressionProcessor class, which uses Spring's StandardEvaluationContext and SpelExpressionParser to evaluate user-controlled or attacker-influenced expressions without sufficient sanitization. SpEL (Spring Expression Language) is a powerful templating language that, when evaluated on untrusted input, can be leveraged for arbitrary code execution through method invocation, class instantiation, and property access. This is a classic instantiation of CWE-74 (Improper Neutralization of Special Elements in Output Used by a Downstream Component), where unsanitized input flows directly into a code evaluation context.

Know when Java gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (VulDB) PRIMARY 5.3 MEDIUM
CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N

Primary rating from Vendor (VulDB) · only source for this CVE.

CVSS VectorVendor: VulDB

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
Low
User Interaction
None
Vulnerable system: Confidentiality
Low
Vulnerable system: Integrity
Low
Vulnerable system: Availability
Low
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

Lifecycle Timeline

3
CVSS changed
Apr 26, 2026 - 22:22 NVD
6.3 (MEDIUM) 5.3 (MEDIUM)
Patch released
Apr 26, 2026 - 14:00 nvd
Patch available
CVE Published
Apr 26, 2026 - 13:45 nvd
MEDIUM 5.3

DescriptionCVE.org

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.

Blast Radius

ecosystem impact
† from your stack dependencies † transitive graph · vuln.today resolves 4-path depth
  • 105 maven packages depend on com.baomidou:dynamic-datasource-spring (1 direct, 104 indirect)

Ecosystem-wide dependent count for version 4.5.0.

Threat Intelligence Overview

EPSS Score
0.1%
Top 84% exploitable
Data Quality
8 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment CIRCL GitHub VulDB

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC No
EPSS 0.1%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation
None
System Exposure· derived
Open
Automatable
No
Human Impact· derived
Medium
Technical Impact
Partial

Priority Score

26
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +26
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Code Injection CRITICAL

Code injection occurs when an application accepts user input and passes it directly into a language interpreter or evaluator without proper sanitization.

More in Java

View all
CVE-2012-4681 CRITICAL POC
9.8 Aug 28

Oracle Java SE 7 Update 6 and earlier contains multiple sandbox bypass vulnerabilities via the ClassFinder and forName m

CVE-2015-7450 CRITICAL POC
9.8 Jan 02

Remote code execution in IBM Sterling B2B Integrator, Sterling Integrator, and Tivoli Common Reporting allows unauthenti

CVE-2013-2465 CRITICAL POC
9.8 Jun 18

Java Runtime Environment sandbox bypass via incorrect image channel verification in 2D component allows remote unauthent

CVE-2011-3544 CRITICAL POC
9.8 Oct 19

Oracle Java SE JDK/JRE 7 and 6 Update 27 and earlier allows remote code execution with complete system compromise throug

CVE-2010-1871 HIGH POC
8.8 Aug 05

JBoss Seam 2 in Red Hat JBoss EAP 4.3.0 fails to sanitize JBoss Expression Language inputs, allowing remote attackers to

CVE-2012-1723 CRITICAL POC
9.8 Jun 16

Unspecified vulnerability in the Java Runtime Environment (JRE) component in Oracle Java SE 7 update 4 and earlier, 6 up

CVE-2013-0422 CRITICAL POC
9.8 Jan 10

Multiple vulnerabilities in Oracle Java 7 before Update 11 allow remote attackers to execute arbitrary code by (1) using

CVE-2012-0507 CRITICAL POC
9.8 Jun 07

Unspecified vulnerability in the Java Runtime Environment (JRE) component in Oracle Java SE 7 Update 2 and earlier, 6 Up

CVE-2015-4852 CRITICAL POC
9.8 Nov 18

The WLS Security component in Oracle WebLogic Server 10.3.6.0, 12.1.2.0, 12.1.3.0, and 12.2.1.0 allows remote attackers

CVE-2012-5076 CRITICAL POC
9.8 Oct 16

Unspecified vulnerability in the Java Runtime Environment (JRE) component in Oracle Java SE 7 Update 7 and earlier allow

CVE-2017-3066 CRITICAL POC
9.8 Apr 27

Remote unauthenticated attackers can execute arbitrary code on Adobe ColdFusion servers through Java deserialization fla

CVE-2012-0391 CRITICAL POC
9.8 Jan 08

The ExceptionDelegator component in Apache Struts before 2.2.3.1 interprets parameter values as OGNL expressions during

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy