Vulnerabilities in pkg:npm/@strapi/database
PACKAGECVE-2023-34235 is a HIGH (CVSS 8.6) leaking sensitive user information still vulnerability (CWE-200: Exposure of Sensitive Information to an Unauthorized Actor) affecting @strapi/database libraries in the npm ecosystem. The issue involves leaking sensitive user information still possible by filtering on private with prefix fields. Remediation is available by upgrading affected packages to version 4.10.8.
pkg:npm/@strapi/database
Vulnerability advisories affecting package pkg:npm/@strapi/database. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-9xg4-3qfm-9w8f | CVE-2023-34235 | HIGH | Leaking sensitive user information still possible by filtering on private with prefix fields |
| GHSA-chmr-rg2f-9jmf | CVE-2023-34093 | MODERATE | Making all attributes on a content-type public without noticing it |
CVE-2023-34235 at a Glance
Security Impact
CVSS: 8.6
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:C/C:H/I:N/A:N).
How to Fix CVE-2023-34235
To remediate this vulnerability, upgrade all affected @strapi/database dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install @strapi/database@4.10.8
npm install @strapi/utils@4.10.8
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls @strapi/database
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2023-34235, inspect your project dependencies using npm:
npm ls @strapi/database
Analyze the terminal output to locate any version of @strapi/database in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 4.10.8), your application is affected.
Note: The npm ls @strapi/database command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-200: Exposure of Sensitive Information to an Unauthorized Actor, where the product exposes sensitive information to an actor that is not explicitly authorized to have access to that information. In @strapi/database, 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-2023-34235 Affected @strapi/database Versions
2 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
@strapi/database
|
npm |
< 4.10.8
|
4.10.8
|
|
@strapi/utils
|
npm |
< 4.10.8
|
4.10.8
|
References
Frequently Asked Questions
What is CVE-2023-34235?
Which @strapi/database versions are affected?
What version fixes CVE-2023-34235?
Is @strapi/database affected?
Is @strapi/utils affected?
What is the CVSS score of CVE-2023-34235?
What CWE is associated with CVE-2023-34235?
How can I check npm dependencies for CVE-2023-34235?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-9xg4-3qfm-9w8f",
"modified" : "2023-07-25T17:17:37Z",
"published" : "2023-07-25T17:17:37Z",
"aliases" : [ "CVE-2023-34235" ],
"summary" : "Leaking sensitive user information still possible by filtering on private with prefix fields",
"details" : "### Summary\nStill able to leak private fields if using the t(number) prefix \n\n### Details\nKnex query allows you to change there default prefix \n```SqliteError: select distinct `t0`.* from `pages` as `t0` left join `admin_users` as `t1` on `t0`.`updated_by_id` = `t1`.`id` where (`t1`.`password` = 1)```\nso if you change the prefix to the same as it was before or to an other table you want to query you query changes from password to t1.password password is protected by filtering protections but t1.password is not protected\n### PoC\n1 Create a contentType\n2 add to its options \"populateCreatorFields\"\n3 create 1 entity in your new content type\n4 in settings enable the find route in settings for the content type you created for public\n5 /api/(Your contenttype)?filters%5BupdatedBy%5D%5Bt1.password%5D%5B%24startsWith%5D=a%24\nAnd now the api returns noting if you were to do\n/api/(Your contenttype)?filters%5BupdatedBy%5D%5Bt1.password%5D%5B%24startsWith%5D=%24 it would return your entity\n\n### Impact\nYou can do filtering attacks on everything related to the object again including admin passwords and reset-tokens.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:N/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "@strapi/database"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "4.10.8"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 4.10.7"
}
}, {
"package" : {
"ecosystem" : "npm",
"name" : "@strapi/utils"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "4.10.8"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 4.10.7"
}
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/strapi/strapi/security/advisories/GHSA-9xg4-3qfm-9w8f"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-34235"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/strapi/strapi"
}, {
"type" : "WEB",
"url" : "https://github.com/strapi/strapi/releases/tag/v4.10.8"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-200" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2023-07-25T17:17:37Z",
"nvd_published_at" : "2023-07-25T18:15:10Z"
}
}