CVE-2022-23857: Github.com/navidrome/navidrome SQL Injection Vulnerability
MODERATECVE-2022-23857 is a MODERATE sql injection vulnerability (CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')) affecting Github.com/navidrome/navidrome libraries in the Go ecosystem. The issue involves sql injection in github.com/navidrome/navidrome. Remediation is available by upgrading affected packages to version 0.47.5.
CVE-2022-23857 at a Glance
How to Fix CVE-2022-23857
To remediate this vulnerability, upgrade all affected Github.com/navidrome/navidrome 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/navidrome/navidrome to 0.47.5
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for github.com/navidrome/navidrome
How to Check if You Are Affected
To determine whether your application is affected by CVE-2022-23857, inspect your project dependencies for Github.com/navidrome/navidrome:
inspect dependencies for github.com/navidrome/navidrome
Analyze the terminal output to locate any version of Github.com/navidrome/navidrome in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.47.5), 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/navidrome/navidrome, 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-2022-23857 Affected Github.com/navidrome/navidrome Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
github.com/navidrome/navidrome
|
Go |
< 0.47.5
|
0.47.5
|
References
Frequently Asked Questions
What is CVE-2022-23857?
Which Github.com/navidrome/navidrome versions are affected?
What version fixes CVE-2022-23857?
Is github.com/navidrome/navidrome affected?
What CWE is associated with CVE-2022-23857?
How can I check Go dependencies for CVE-2022-23857?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-pmcr-2rhp-36hr",
"modified" : "2022-01-25T21:03:46Z",
"published" : "2022-01-27T16:23:02Z",
"aliases" : [ "CVE-2022-23857" ],
"summary" : "SQL injection in github.com/navidrome/navidrome",
"details" : "model/criteria/criteria.go in Navidrome before 0.47.5 is vulnerable to SQL injection attacks when processing crafted Smart Playlists. An authenticated user could abuse this to extract arbitrary data from the database, including the user table (which contains sensitive information such as the users' encrypted passwords).",
"severity" : [ ],
"affected" : [ {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/navidrome/navidrome"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.47.5"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2022-23857"
}, {
"type" : "WEB",
"url" : "https://github.com/navidrome/navidrome/commit/9e79b5cbf2a48c1e4344df00fea4ed3844ea965d"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/navidrome/navidrome"
}, {
"type" : "WEB",
"url" : "https://github.com/navidrome/navidrome/releases/tag/v0.47.5"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-89" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2022-01-25T21:03:46Z",
"nvd_published_at" : "2022-01-24T02:15:00Z"
}
}