CVE-2024-40120: Github.com/seaweedfs/seaweedfs SQL Injection Vulnerability
MODERATECVE-2024-40120 is a MODERATE (CVSS 6.5) sql injection vulnerability (CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')) affecting Github.com/seaweedfs/seaweedfs libraries in the Go ecosystem. The issue involves seaweedfs vulnerable to sql injection. Remediation is available by upgrading affected packages to version 0.0.0-20240625155419-9ac102336200.
CVE-2024-40120 at a Glance
Security Impact
CVSS: 6.5
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N).
How to Fix CVE-2024-40120
To remediate this vulnerability, upgrade all affected Github.com/seaweedfs/seaweedfs dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade github.com/seaweedfs/seaweedfs to 0.0.0-20240625155419-9ac102336200
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for github.com/seaweedfs/seaweedfs
How to Check if You Are Affected
To determine whether your application is affected by CVE-2024-40120, inspect your project dependencies for Github.com/seaweedfs/seaweedfs:
inspect dependencies for github.com/seaweedfs/seaweedfs
Analyze the terminal output to locate any version of Github.com/seaweedfs/seaweedfs in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.0.0-20240625155419-9ac102336200), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection'), where the product constructs all or part of an sql command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended sql command when it is sent to a downstream component. without sufficient removal or quoting of sql syntax in user-controllable inputs, the generated sql query can cause those inputs to be interpreted as sql instead of ordinary user data. In Github.com/seaweedfs/seaweedfs, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2024-40120 Affected Github.com/seaweedfs/seaweedfs Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
github.com/seaweedfs/seaweedfs
|
Go |
< 0.0.0-20240625155419-9ac102336200
|
0.0.0-20240625155419-9ac102336200
|
References
Frequently Asked Questions
What is CVE-2024-40120?
Which Github.com/seaweedfs/seaweedfs versions are affected?
What version fixes CVE-2024-40120?
Is github.com/seaweedfs/seaweedfs affected?
What is the CVSS score of CVE-2024-40120?
What CWE is associated with CVE-2024-40120?
How can I check Go dependencies for CVE-2024-40120?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-q97m-8853-pq76",
"modified" : "2025-05-16T21:59:35Z",
"published" : "2025-05-16T15:31:02Z",
"aliases" : [ "CVE-2024-40120" ],
"summary" : "SeaweedFS Vulnerable to SQL Injection",
"details" : "seaweedfs v3.68 was discovered to contain a SQL injection vulnerability via the component /abstract_sql/abstract_sql_store.go.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/seaweedfs/seaweedfs"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.0.0-20240625155419-9ac102336200"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-40120"
}, {
"type" : "WEB",
"url" : "https://github.com/seaweedfs/seaweedfs/issues/5710"
}, {
"type" : "WEB",
"url" : "https://github.com/seaweedfs/seaweedfs/commit/9ac1023362000f6e8e58c9d278653f5926a0d90e"
}, {
"type" : "WEB",
"url" : "https://gist.github.com/sud0why/1b2115c1d644bd3db1c1b3f16684a78c"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/seaweedfs/seaweedfs"
}, {
"type" : "WEB",
"url" : "https://github.com/seaweedfs/seaweedfs/releases/tag/3.69"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-89" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2025-05-16T21:59:34Z",
"nvd_published_at" : "2025-05-16T13:15:51Z"
}
}