CVE-2023-34093: @strapi/strapi Making All Attributes On A Vulnerability
MODERATECVE-2023-34093 is a MODERATE (CVSS 4.8) making all attributes on a vulnerability (CWE-200: Exposure of Sensitive Information to an Unauthorized Actor) affecting @strapi/strapi libraries in the npm ecosystem. The issue involves making all attributes on a content-type public without noticing it. Remediation is available by upgrading affected packages to version 4.10.8.
CVE-2023-34093 at a Glance
Security Impact
CVSS: 4.8
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:H/UI:R/S:U/C:H/I:L/A:N).
How to Fix CVE-2023-34093
To remediate this vulnerability, upgrade all affected @strapi/strapi 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/strapi@4.10.8
npm install @strapi/utils@4.10.8
npm install @strapi/database@4.10.8
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls @strapi/strapi
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2023-34093, inspect your project dependencies using npm:
npm ls @strapi/strapi
Analyze the terminal output to locate any version of @strapi/strapi 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/strapi 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/strapi, 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-34093 Affected @strapi/strapi Versions
3 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
@strapi/strapi
|
npm |
< 4.10.8
|
4.10.8
|
|
@strapi/utils
|
npm |
< 4.10.8
|
4.10.8
|
|
@strapi/database
|
npm |
< 4.10.8
|
4.10.8
|
References
Frequently Asked Questions
What is CVE-2023-34093?
Which @strapi/strapi versions are affected?
What version fixes CVE-2023-34093?
Is @strapi/strapi affected?
Is @strapi/utils affected?
What is the CVSS score of CVE-2023-34093?
What CWE is associated with CVE-2023-34093?
How can I check npm dependencies for CVE-2023-34093?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-chmr-rg2f-9jmf",
"modified" : "2023-07-25T17:17:12Z",
"published" : "2023-07-25T17:17:12Z",
"aliases" : [ "CVE-2023-34093" ],
"summary" : "Making all attributes on a content-type public without noticing it",
"details" : "### Summary\nAnyone (Strapi developers, users, plugins) can make every attribute of a Content-Type public without knowing it.\n\n### Details\nWhen dealing with content-types inside a Strapi instance, we can extend those using the appropriate container:\n```javascript\nstrapi.container.get('content-types').extend(contentTypeUID, (contentType) => newContentType);\n```\nThe vulnerability only affects the handling of content types by Strapi, not the actual content types themselves. Users can use plugins or modify their own content types without realizing that the `privateAttributes` getter is being removed, which can result in any attribute becoming public. This can lead to sensitive information being exposed or the entire system being taken control of by an attacker(having access to password hashes).\n\n### PoC\nExtend any content type on runtime (like in the bootstrap functions) and do a copy of the content-type object.\n```javascript\nstrapi.container.get('content-types').extend(contentTypeUID, (contentType) => {\n const newCT = { ... contentType, attributes: { ...contentType.attributes, newAttr: {} } };\n return newCT;\n});\n```\nThis will have as effect to remove the getter and as we rely on it in sanitization, every attributes will be considered as public.\n\n### Impact\nEveryone can be impacted. Depending on how people are using/extending content-types. If the users are mutating the content-type, they will not be affected.\n",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:H/PR:H/UI:R/S:U/C:H/I:L/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "@strapi/strapi"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "4.10.8"
} ]
} ]
}, {
"package" : {
"ecosystem" : "npm",
"name" : "@strapi/utils"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "4.10.8"
} ]
} ]
}, {
"package" : {
"ecosystem" : "npm",
"name" : "@strapi/database"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "4.10.8"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/strapi/strapi/security/advisories/GHSA-chmr-rg2f-9jmf"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-34093"
}, {
"type" : "WEB",
"url" : "https://github.com/strapi/strapi/commit/2fa8f30371bfd1db44c15e5747860ee5789096de"
}, {
"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" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2023-07-25T17:17:12Z",
"nvd_published_at" : "2023-07-25T15:15:13Z"
}
}