6.4medium
Permissions not properly checked in Invenio-Drafts-Resources
- Severity
- 6.4medium CVSS:3.1 by GitHub_M
- Exploit likelihood
- 0.68% (higher than 53% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-xr38-w74q-r8jvPYSEC-2021-836PYSEC-2021-837PYSEC-2021-838
Description
Invenio-Drafts-Resources is a submission/deposit module for Invenio, a software framework for research data management. Invenio-Drafts-Resources prior to versions 0.13.7 and 0.14.6 does not properly check permissions when a record is published. The vulnerability is exploitable in a default installation of InvenioRDM. An authenticated a user is able via REST API calls to publish draft records of other users if they know the record identifier and the draft validates (e.g. all require fields filled out). An attacker is not able to modify the data in the record, and thus e.g. *cannot* change a record from restricted to public. The problem is patched in Invenio-Drafts-Resources v0.13.7 and 0.14.6, which is part of InvenioRDM v6.0.1 and InvenioRDM v7.0 respectively.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| inveniosoftware invenio-drafts-resources | < 0.13.7, >= 0.14.0, < 0.14.6, before 0.13.7, from 0.14.0 before 0.14.6 | CVE List, NVD |
| invenio-drafts-resources (PyPI) | before 0.13.7, from 0.14.0 before 0.14.6, before 039b0cff1ad4b952000f4d8c3a93f347108b6626 | GitHub Advisory Database, PyPA Advisory Database |
| invenio-app-rdm (PyPI) | before 6.0.5, from 7.0.0.dev0 before 7.0.0.dev5, before 039b0cff1ad4b952000f4d8c3a93f347108b6626 | GitHub Advisory Database, PyPA Advisory Database |
| invenio-rdm-records (PyPI) | before 0.32.6, from 0.33.0 before 0.33.10, before 039b0cff1ad4b952000f4d8c3a93f347108b6626 | GitHub Advisory Database, PyPA Advisory Database |
All scores
| GitHub_M | 6.4medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:L/A:N |
| GitHub | 6.4medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:L/A:N |
| GitHub | medium CVSS:4.0 | CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N |
| NVD | 4.3medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N |
| NVD | 4.0medium CVSS:2.0 | AV:N/AC:L/Au:S/C:P/I:N/A:N |
Classification
What each source says
CVE List
Invenio-Drafts-Resources is a submission/deposit module for Invenio, a software framework for research data management. Invenio-Drafts-Resources prior to versions 0.13.7 and 0.14.6 does not properly check permissions when a record is published. The vulnerability is exploitable in a default installation of InvenioRDM. An authenticated a user is able via REST API calls to publish draft records of other users if they know the record identifier and the draft validates (e.g. all require fields filled out). An attacker is not able to modify the data in the record, and thus e.g. *cannot* change a record from restricted to public. The problem is patched in Invenio-Drafts-Resources v0.13.7 and 0.14.6, which is part of InvenioRDM v6.0.1 and InvenioRDM v7.0 respectively.
GitHub Advisory Database
Impact
Invenio-Drafts-Resources does not properly check permissions when a record is published. The vulnerability is exploitable in a default installation of InvenioRDM. An authenticated user is able via REST API calls to publish draft records of other users if they know the record identifier and the draft validates (e.g. all require fields filled out). An attacker is not able to modify the data in the record, and thus e.g. cannot change a record from restricted to public.
Details
The service's publish() method contains the following permission check:
def publish(..):
self.require_permission(identity, "publish")
However, the record should have been passed into the permission check so that the need generators have access to e.g. the record owner.
def publish(..):
self.require_permission(identity, "publish", record=record)
The bug is activated in Invenio-RDM-Records which has a need generator called RecordOwners(), which when no record is passed in defaults to allow any authenticated user:
class RecordOwners(Generator):
def needs(self, record=None, **kwargs):
if record is None:
return [authenticated_user]
# ...
Patches
The problem is patched in Invenio-Drafts-Resources v0.13.7 and 0.14.6+, which is part of InvenioRDM v6.0.1 and InvenioRDM v7.0 respectively.
You can verify the version installed of Invenio-Drafts-Resources via PIP:
cd ~/src/my-site
pipenv run pip freeze | grep invenio-drafts-resources
References
For more information
If you have any questions or comments about this advisory:
- Chat with us on Discord: https://discord.gg/8qatqBC
NVD (es)
Invenio-Drafts-Resources es un módulo de envío/depósito para Invenio, un marco de software para la administración de datos de investigación. Invenio-Drafts-Resources anterior a versiones 0.13.7 y 0.14.6, no comprueba correctamente los permisos cuando es publicado un registro. La vulnerabilidad es explotable en una instalación por defecto de InvenioRDM. Un usuario autenticado es capaz, por medio de llamadas a la API REST, de publicar borradores de registros de otros usuarios si conoce el identificador del registro y el borrador es comprobado (por ejemplo, si se rellenan todos los campos obligatorios). Un atacante no puede modificar los datos del registro y, por tanto, no puede cambiar un registro de restringido a público. El problema está parcheado en Invenio-Drafts-Resources versiones v0.13.7 y 0.14.6, que forman parte de InvenioRDM versión v6.0.1 e InvenioRDM versión v7.0 respectivamente
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2021-43781 changed 2024-08-04 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-xr38-w74q-r8jv changed 2026-07-08 | CC-BY-4.0 |
| NVD | CVE-2021-43781 changed 2026-06-17 | Public domain |
| PyPA Advisory Database | PYSEC-2021-836 changed 2023-11-08 | CC-BY-4.0 |
| PyPA Advisory Database | PYSEC-2021-837 changed 2023-11-08 | CC-BY-4.0 |
| PyPA Advisory Database | PYSEC-2021-838 changed 2023-11-08 | CC-BY-4.0 |