{"id":"CVE-2021-43781","aliases":["CVE-2021-43781","GHSA-xr38-w74q-r8jv","PYSEC-2021-836","PYSEC-2021-837","PYSEC-2021-838"],"related":[],"kind":"vulnerability","state":"published","title":"Permissions not properly checked in Invenio-Drafts-Resources","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"### Impact\n\nInvenio-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.\n\n### Details\n\nThe service's ``publish()`` method contains the following permission check:\n\n```python\ndef publish(..):\n    self.require_permission(identity, \"publish\")\n```\nHowever, the record should have been passed into the permission check so that the need generators have access to e.g. the record owner.\n\n```python\ndef publish(..):\n    self.require_permission(identity, \"publish\", record=record)\n```\nThe 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:\n\n```python\nclass RecordOwners(Generator):\n    def needs(self, record=None, **kwargs):\n        if record is None:\n            return [authenticated_user]\n    # ...\n```\n\n### Patches\n\nThe 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.\n\nYou can verify the version installed of Invenio-Drafts-Resources via PIP:\n\n```console\ncd ~/src/my-site\npipenv run pip freeze | grep invenio-drafts-resources\n```\n\n### References\n\n- [Security policy](https://invenio.readthedocs.io/en/latest/community/security-policy.html)\n\n### For more information\n\nIf you have any questions or comments about this advisory:\n* Chat with us on Discord: https://discord.gg/8qatqBC","format":"markdown","source":"ghsa"},{"lang":"es","text":"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","source":"nvd"}],"published":"2021-12-06T17:45:10.000Z","modified":"2026-07-08T06:28:15.987Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:L/A:N","score":6.4,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:L/A:N","score":6.4,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:L/A:N","score":6.4,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"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","rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N","score":4.3,"rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:2.0","vector":"AV:N/AC:L/Au:S/C:P/I:N/A:N","score":4,"rating":"MEDIUM"}],"cwes":["CWE-862","CWE-863"],"affected":[{"ranges":[{"version":"< 0.13.7","status":"affected"},{"version":">= 0.14.0, < 0.14.6","status":"affected"}],"vendor":"inveniosoftware","product":"invenio-drafts-resources","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"0.13.7"}],"ecosystem":"PyPI","package":"invenio-drafts-resources","purl":"pkg:pypi/invenio-drafts-resources","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"6.0.5"}],"ecosystem":"PyPI","package":"invenio-app-rdm","purl":"pkg:pypi/invenio-app-rdm","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"0.32.6"}],"ecosystem":"PyPI","package":"invenio-rdm-records","purl":"pkg:pypi/invenio-rdm-records","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"0.14.0","status":"affected","fixed":"0.14.6"}],"ecosystem":"PyPI","package":"invenio-drafts-resources","purl":"pkg:pypi/invenio-drafts-resources","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"0.33.0","status":"affected","fixed":"0.33.10"}],"ecosystem":"PyPI","package":"invenio-rdm-records","purl":"pkg:pypi/invenio-rdm-records","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"7.0.0.dev0","status":"affected","fixed":"7.0.0.dev5"}],"ecosystem":"PyPI","package":"invenio-app-rdm","purl":"pkg:pypi/invenio-app-rdm","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"0.13.7"},{"status":"affected","introduced":"0.14.0","fixed":"0.14.6"}],"vendor":"inveniosoftware","product":"invenio-drafts-resources","cpe":"cpe:2.3:a:inveniosoftware:invenio-drafts-resources:*:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"type":"git","introduced":"0","status":"affected","fixed":"039b0cff1ad4b952000f4d8c3a93f347108b6626"},{"type":"ecosystem","introduced":"0","status":"affected","fixed":"0.13.7"},{"type":"ecosystem","introduced":"0.14.0","status":"affected","fixed":"0.14.6"}],"ecosystem":"PyPI","package":"invenio-drafts-resources","purl":"pkg:pypi/invenio-drafts-resources","repo":"https://github.com/inveniosoftware/invenio-drafts-resources","source":"pysec"},{"ranges":[{"type":"git","introduced":"0","status":"affected","fixed":"039b0cff1ad4b952000f4d8c3a93f347108b6626"},{"type":"ecosystem","introduced":"0","status":"affected","fixed":"6.0.5"},{"type":"ecosystem","introduced":"7.0.0.dev0","status":"affected","fixed":"7.0.0.dev5"}],"ecosystem":"PyPI","package":"invenio-app-rdm","purl":"pkg:pypi/invenio-app-rdm","repo":"https://github.com/inveniosoftware/invenio-drafts-resources","source":"pysec"},{"ranges":[{"type":"git","introduced":"0","status":"affected","fixed":"039b0cff1ad4b952000f4d8c3a93f347108b6626"},{"type":"ecosystem","introduced":"0","status":"affected","fixed":"0.32.6"},{"type":"ecosystem","introduced":"0.33.0","status":"affected","fixed":"0.33.10"}],"ecosystem":"PyPI","package":"invenio-rdm-records","purl":"pkg:pypi/invenio-rdm-records","repo":"https://github.com/inveniosoftware/invenio-drafts-resources","source":"pysec"}],"references":[{"url":"https://github.com/inveniosoftware/invenio-drafts-resources/security/advisories/GHSA-xr38-w74q-r8jv","tags":["advisory","exploit","third-party-advisory","web","x-refsource-confirm","x-transferred"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://github.com/inveniosoftware/invenio-drafts-resources/commit/039b0cff1ad4b952000f4d8c3a93f347108b6626","tags":["fix","patch","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2021-43781","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/pypa/advisory-database/tree/main/vulns/invenio-app-rdm/PYSEC-2021-837.yaml","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/pypa/advisory-database/tree/main/vulns/invenio-drafts-resources/PYSEC-2021-836.yaml","tags":["web"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2021-43781","url":"https://www.cve.org/CVERecord?id=CVE-2021-43781","licence":"CVE Terms of Use","modified":"2024-08-04T04:03:08.806Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-xr38-w74q-r8jv","url":"https://github.com/advisories/GHSA-xr38-w74q-r8jv","licence":"CC-BY-4.0","modified":"2026-07-08T06:28:15.987Z"},{"source":"nvd","name":"NVD","id":"CVE-2021-43781","url":"https://nvd.nist.gov/vuln/detail/CVE-2021-43781","licence":"Public domain","modified":"2026-06-17T04:11:25.587Z"},{"source":"pysec","name":"PyPA Advisory Database","id":"PYSEC-2021-836","url":"https://osv.dev/vulnerability/PYSEC-2021-836","licence":"CC-BY-4.0","modified":"2023-11-08T04:07:11.815Z"},{"source":"pysec","name":"PyPA Advisory Database","id":"PYSEC-2021-837","url":"https://osv.dev/vulnerability/PYSEC-2021-837","licence":"CC-BY-4.0","modified":"2023-11-08T04:07:11.815Z"},{"source":"pysec","name":"PyPA Advisory Database","id":"PYSEC-2021-838","url":"https://osv.dev/vulnerability/PYSEC-2021-838","licence":"CC-BY-4.0","modified":"2023-11-08T04:07:11.815Z"}],"updatedAt":"2026-11-25T22:24:36.152Z","epss":{"score":0.00684,"percentile":0.5384,"date":"2026-12-01T12:00:22.000Z"}}