CVE-2023-39345
highpriority · track · 30EPSS 0.006 · 48 %ileEUUSEPSS · scored 2026-10-27
strapi is an open-source headless CMS. Versions prior to 4.13.1 did not properly restrict write access to fielded marked as private in the user registration endpoint. As such malicious users may be able to errantly modify their user records. This issue has been addressed in version 4.13.1. Users are advised to upgrade. There are no known workarounds for this vulnerability.
cvss
Technical severity, 0–10. One row per scoring source.
base score 0–10 · higher = more severe · hover a vector to decode⚠ sources disagree · medium–high · 6.9–7.6
ssvc
A stakeholder decision — act, attend, or track — from exploitation and impact.
weaknesses
The CWE weakness classes this flaw belongs to.
affected products (4)
Products and version ranges known to be affected.
advisories (1)
Vendor and ecosystem advisories describing this.
- GHSA-gc7p-j5xm-xxh2Unauthorized Access to Private Fields in User Registration API2023-11-03ghsa · osvUS
### System Details | Name | Value | |----------|------------------------| | OS | Windows 11 | | Version | 4.11.1 (node v16.14.2) | | Database | mysql | ### Description I marked some fields as private fields in user content-type, and tried to register as a new user via api, at the same time I added content to fill the private fields and sent a post request, and as you can see from the images below, I can write to the private fields.     To prevent this, I went to the extension area and tried to extend the register method, for this I wanted to do it using the sanitizeInput function that I know in the source codes of the strap. But the sanitizeInput function did not filter out private fields. ```js const { auth } = ctx.state; const data = ctx.request.body; const userSchema = strapi.getModel("plugin::users-permissions.user"); sanitize.contentAPI.input(data, userSchema, { auth }); ``` here's the solution I've temporarily kept to myself, code snippet ```js const body = ctx.request.body; const { attributes } = strapi.getModel("plugin::users-permissions.user"); const sanitizedData = _.omitBy(body, (data, key) => { const attribute = attributes[key]; if (_.isNil(attribute)) { return false; } //? If you want, you can throw an error for fields that we did not expect. // if (_.isNil(attribute)) // throw new ApplicationError(`Unexpected value ${key}`); // if private value is true, we do not want to send it to the database. return attribute.private; }); return sanitizedData; ```
also known as (3)
Other names and identifiers for this entity.
sources
Which sources assert this record, and when.
references (5)
External citations — patches, advisories, analysis.
- https://cxsecurity.com/cveshow/CVE-2023-39345/cnnvd
- https://github.com/strapi/strapi/releases/tag/v4.14.6Patchcnnvd
- https://github.com/strapi/strapi/security/advisories/GHSA-gc7p-j5xm-xxh2cnnvd
- https://github.com/strapi/strapi/security/advisories/GHSA-gc7p-j5xm-xxh2enisa_euvd
- https://github.com/strapi/strapi/security/advisories/GHSA-gc7p-j5xm-xxh2ExploitVendor Advisorynvd
Attackers weaponise vulnerabilities like this against internet-exposed services. See what is exposed on your perimeter with a free passive scan.
Free scan