Summary
Permissions not properly checked in Invenio-Drafts-Resources
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]
# ...
References
For more information
If you have any questions or comments about this advisory:
- Chat with us on Discord: https://discord.gg/8qatqBC
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.
The application does not perform an authorization check before performing a sensitive operation. Typical impact: unauthorized access to restricted functionality or data.
CVE-2021-43781 has a CVSS score of 6.4 (Medium). The vector is network-reachable, low privileges required, and no user interaction. A CVSS score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether this affects your application depends on whether the vulnerable code is present and reachable in your environment. A fixed version is available (0.13.7, 6.0.5, 0.32.6, 0.14.6, 0.33.10, 7.0.0.dev5); upgrading removes the vulnerable code path.
Affected versions
Security releases
Kodem intelligence
Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.
Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.
Already deployed Kodem?
See it in your environmentNew to Kodem? Get a demo →Remediation advice
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
Frequently Asked Questions
- What is CVE-2021-43781? CVE-2021-43781 is a medium-severity missing authorization vulnerability in invenio-drafts-resources (pip), affecting versions < 0.13.7. It is fixed in 0.13.7, 6.0.5, 0.32.6, 0.14.6, 0.33.10, 7.0.0.dev5. The application does not perform an authorization check before performing a sensitive operation.
- How severe is CVE-2021-43781? CVE-2021-43781 has a CVSS score of 6.4 (Medium). This score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether it represents real risk in your environment depends on whether the vulnerable code is present and reachable.
- Which packages are affected by CVE-2021-43781?
invenio-drafts-resources(pip) (versions < 0.13.7)invenio-app-rdm(pip) (versions < 6.0.5)invenio-rdm-records(pip) (versions < 0.32.6)
- Is there a fix for CVE-2021-43781? Yes. CVE-2021-43781 is fixed in 0.13.7, 6.0.5, 0.32.6, 0.14.6, 0.33.10, 7.0.0.dev5. Upgrade to this version or later.
- Is CVE-2021-43781 exploitable, and should I be worried? Whether CVE-2021-43781 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
- What actually determines whether CVE-2021-43781 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
- How do I fix CVE-2021-43781?
- Upgrade
invenio-drafts-resourcesto 0.13.7 or later - Upgrade
invenio-app-rdmto 6.0.5 or later - Upgrade
invenio-rdm-recordsto 0.32.6 or later - Upgrade
invenio-drafts-resourcesto 0.14.6 or later - Upgrade
invenio-rdm-recordsto 0.33.10 or later - Upgrade
invenio-app-rdmto 7.0.0.dev5 or later
- Upgrade