CVE-2023-39345
Unauthorized Access to Private Fields in User Registration API in strapi
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.
Attack profile
How easy it is to exploit
- Attack vector
- Adjacent network
- Complexity
- Low
- Privileges needed
- None
- User interaction
- None
What an attacker can affect
- Confidentiality
- Low
- Integrity
- High
- Availability
- Low
Exploit likelihood
What each source reports
CVE List Score used
7.6
Unauthorized Access to Private Fields in User Registration API in strapi
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.
- Record
CVE-2023-39345- CVSS 3.1
- 7.6 High
CVSS:3.1/AV:A/AC:L/PR:N/UI:N/S:U/C:L/I:H/A:L - Weakness
- CWE-287
- Updated
- 2026-11-02
EUVDEUVD-2023-2965
7.6
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.
- Record
EUVD-2023-2965- CVSS 3.1
- 7.6 High
CVSS:3.1/AV:A/AC:L/PR:N/UI:N/S:U/C:L/I:H/A:L - Updated
- 2026-11-03
GitHub AdvisoriesGHSA-gc7p-j5xm-xxh2
7.6
Unauthorized Access to Private Fields in User Registration API
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.
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
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;
- Record
GHSA-gc7p-j5xm-xxh2- CVSS 3.1
- 7.6 High
CVSS:3.1/AV:A/AC:L/PR:N/UI:N/S:U/C:L/I:H/A:L - Weakness
- CWE-287
- Updated
- 2026-11-02
NVD
7.6
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.
- Record
CVE-2023-39345- CVSS 3.1
- 7.6 High
CVSS:3.1/AV:A/AC:L/PR:N/UI:N/S:U/C:L/I:H/A:L - CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N - Weakness
- CWE-287
- Updated
- 2026-11-02
OSV
7.6
Unauthorized Access to Private Fields in User Registration API in strapi
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.
- Record
CVE-2023-39345- CVSS 3.1
- 7.6 High
CVSS:3.1/AV:A/AC:L/PR:N/UI:N/S:U/C:L/I:H/A:L - Weakness
- CWE-287
- Updated
- 2026-11-02
OSVGHSA-gc7p-j5xm-xxh2
7.6
Unauthorized Access to Private Fields in User Registration API
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.
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
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;
- Record
GHSA-gc7p-j5xm-xxh2- CVSS 3.1
- 7.6 High
CVSS:3.1/AV:A/AC:L/PR:N/UI:N/S:U/C:L/I:H/A:L - Weakness
- CWE-287
- Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
@strapi/plugin-users-permissionsnpm |
4.0.0 up to 4.13.1 | 4.13.1 |
@strapi/strapinpm |
4.0.0 up to 4.13.1 | 4.13.1 |
History
| Recorded | Changed | Sources |
|---|---|---|
| aliases | EUVD | |
| first indexed | CVE List, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2023-39345 is a high vulnerability (CVSS 7.6) in Strapi, published November 3, 2023. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.59%, the 48th percentile. Fixed in @strapi/plugin-users-permissions 4.13.1.
References
github.com/strapi/strapi/security/advisories/GHSA-gc7p-j5xm-xxh2
strapi.io/blog/security-disclosure-of-vulnerabilities-sept-2023
nvd.nist.gov/vuln/detail/CVE-2023-39345
github.com/advisories/GHSA-gc7p-j5xm-xxh2
github.com/CVEProject/cvelistV5/tree/main/cves/2023/39xxx/CVE-2023-39345.json
github.com/strapi/strapi