ShardingsphereApplication · Apache

CVE-2023-28754

HIGH · 8.8 CVSS v3.1 Published 2023-07-19
Fix available
A fix is available. Upgrade to 5.4.0 or later.
See remediation →
94/100
Remediation priority · Urgent
Remotely reachable Zero-click

Official description Straight from the sourceThe vendor's or NVD's own wording, published unedited. Authoritative, but often terse — it says what broke, rarely what to do.

NVD · unedited
Deserialization of Untrusted Data vulnerability in Apache ShardingSphere-Agent, which allows attackers to execute arbitrary code by constructing a special YAML configuration file. The attacker needs to have permission to modify the ShardingSphere Agent YAML configuration file on the target machine, and the target machine can access the URL with the arbitrary code JAR. An attacker can use SnakeYAML to deserialize java.net.URLClassLoader and make it load a JAR from a specified URL, and then deserialize javax.script.ScriptEngineManager to load code using that ClassLoader. When the ShardingSphere JVM process starts and uses the ShardingSphere-Agent, the arbitrary code specified by the attacker will be executed during the deserialization of the YAML configuration file by the Agent. This issue affects ShardingSphere-Agent: through 5.3.2. This vulnerability is fixed in Apache ShardingSphere 5.4.0.

Technical summary Written by usOur analysis, written from the advisory, the CVSS vector and the affected-version data. It adds context the advisory leaves out, and never invents facts that are not in the source.

dbcve analysis · high confidence

A deserialization vulnerability in Apache ShardingSphere-Agent allows RCE via specially crafted YAML configuration files. Attackers with file write access can use SnakeYAML to deserialize java.net.URLClassLoader (loading malicious JARs from attacker-controlled URLs) and javax.script.ScriptEngineManager to execute arbitrary code during JVM startup when the Agent parses the YAML config.

MitigationUpgrade ShardingSphere-Agent to version 5.4.0 or later. Until then, restrict filesystem permissions on the YAML configuration file to prevent unauthorized modification and implement network controls to block access to untrusted URLs.

Verify against the referenced sources before acting — the references below are authoritative for this CVE, this summary is not.

Affected products & versions What the vendor confirmedThe version ranges the vendor confirmed as vulnerable. If your version sits inside a range here, treat yourself as exposed until you have upgraded.

NVD · CPE data
ShardingsphereApplication
Affected:< 5.4.0

CVSS breakdown How the score is builtThe industry scoring standard. It rates how the flaw is reached, what it takes to exploit, and what an attacker gains — the score is derived from those, not the other way round.

From the vector
Attack vector
Network
Complexity
Low
Privileges
Low
User interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

Am I affected? How to checkSteps we derive from the advisory and the affected-version data, so you can decide whether this CVE reaches your setup. They are a guide, not a scan — your own configuration is the authority.

dbcve checks

Work through these to decide whether this CVE applies to you.

  1. Identify ShardingSphere-Agent installation and version
    Locate the ShardingSphere-Agent JAR file (typically named sharding-sphere-agent-*.jar) and check its version in the filename or manifest. Run: ls -la <agent-jar-path> and examine the JAR filename for version numbers, or use 'java -jar <agent-jar-path> --version' if supported.
    Affected if The installed version is lower than 5.4.0 (e.g., 5.3.x, 5.2.x, etc.)
  2. Verify the agent is configured with a YAML configuration file
    Check for the presence of a YAML configuration file referenced by the agent. Common locations include agent.yaml, conf/agent.yaml, or files specified via -DshardingSphere.agent.conf or similar JVM arguments. Search for files with .yaml or .yml extensions in the agent configuration directory.
    Affected if A YAML configuration file exists and is being loaded by the agent (the vulnerability only applies when YAML config is parsed)
  3. Inspect file permissions on the YAML configuration
    Run 'ls -la <path-to-agent-yaml>' to view permissions. The vulnerability requires an attacker to modify the YAML file, so check if write permissions are granted to non-admin users or processes.
    Affected if The YAML config file is writable by users or processes other than the administrator (chmod allows write for group/others)
  4. Check for JVM startup scripts that load the agent
    Review startup scripts (startup.sh, startup.bat, or service configurations) that include -javaagent:<path-to-agent-jar>. This confirms the agent is active and will parse the YAML config during JVM startup.
    Affected if A -javaagent JVM argument is present pointing to a ShardingSphere-Agent JAR version below 5.4.0

You are affected if ShardingSphere-Agent version is below 5.4.0, the agent is configured with a YAML configuration file, and the YAML file is writable by an attacker or the agent is processing untrusted YAML input.

Generated from the published advisory. Verify against your own configuration.

Check your environment

Paste your version and any relevant configuration and it will be compared against the affected criteria above. Do not include secrets or credentials.

AI-assisted, checked against the advisory. Informational, not a guarantee.

Remediation Closing itWhat it takes to close this. Where a vendor fix exists we point at it; where none exists we say so plainly, and can build one. Effort estimates are scoped from the advisory, not from your codebase.

dbcve · scoped
Upgrade available Upgrade to 5.4.0 or later
Fixed in 5.4.0
Interim mitigation

Upgrade ShardingSphere-Agent to version 5.4.0 or later. Until then, restrict filesystem permissions on the YAML configuration file to prevent unauthorized modification and implement network controls to block access to untrusted URLs.

Recommended fix High confidence

Apache ShardingSphere 5.4.0

  1. 1. Identify the current ShardingSphere-Agent version by checking the agent YAML configuration file or JAR metadata in the ShardingSphere installation directory.
  2. 2. Download Apache ShardingSphere version 5.4.0 from the official Apache ShardingSphere release repository (download.apache.org).
  3. 3. Back up the existing ShardingSphere-Agent configuration files and any custom YAML configurations before proceeding.
  4. 4. Replace the existing ShardingSphere-Agent JAR files with the version 5.4.0 JAR files.
  5. 5. Verify the ShardingSphere-Agent YAML configuration file permissions - ensure only trusted administrators can modify the configuration.
  6. 6. Restart the ShardingSphere JVM process to load the updated agent.
  7. 7. Validate that the agent loads correctly and the system operates normally after the upgrade.
Caveat Review the 5.4.0 release notes for any breaking changes or configuration changes from prior versions before upgrading.

Generated from the published advisory — verify against the referenced sources before acting.

Fix this in Shardingsphere Scoped from the published advisory
  • Consultation4.0 h
  • Implementation4.0 h
  • Testing8.0 h
  • Review / QA4.0 h
20.0 hours of engineering $3,440
Get the upgrade done

An estimate, not a bill — we confirm scope with you before any work starts. Need it this week? Rush from $5,504.

Scan for this in your stack

Free · runs locally
dbcve dependency scanner

Check whether your project pulls in CVE-2023-28754 — or any other known-vulnerable package — straight from your lock files. Free and open source; it runs locally and uploads nothing.

References Go to the primary sourcePrimary sources — vendor advisories, patches and trackers. Where our summary and a reference disagree, the reference wins.

Primary sources

Practitioner notes

Contributed

Peer-ranked notes from engineers who’ve handled CVE-2023-28754 in production — separate from our analysis above.

No notes yet

Be the first to add a field note for this CVE — a mitigation you’ve verified, a version caveat, or a link to a working fix. Sign in above to contribute.

What this is

A place for practitioners to share what actually worked: a mitigation you’ve tested, a configuration change, a version- or environment-specific caveat, or a link to a verified patch. The most useful notes rise to the top as peers upvote them, so the signal stays high.

What belongs here
  • Verified mitigations, workarounds, and config changes
  • Version or environment caveats, and links to real fixes
  • No weaponised exploit code, or anything meant to cause harm
  • No spam, self-promotion, credentials, or personal data