Permissions not properly checked in Invenio-Drafts-Resources
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 service's `publish()` method contains the following permission check:
```python
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.
```python
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:
```python
class RecordOwners(Generator):
def needs(self, record=None, **kwargs):
if record is None:
return [authenticated_user]
# ...
```
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:
```console
cd ~/src/my-site
pipenv run pip freeze | grep invenio-drafts-resources
```
If you have any questions or comments about this advisory:
This issue can be reached over the network, attack complexity is low, an attacker needs low-level privileges on the target. A user must be tricked into taking some action. Rated impact: confidentiality none, integrity none, availability none.
The score comes from this 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
CVE-2021-43781 is classified as CWE-862: Missing Authorization. No authorisation check is performed before carrying out a restricted action.
CVE-2021-43781 is recorded against 3 packages.
Published on 6 December 2021 and last revised on 8 July 2026. No public exploit is currently recorded for this entry. A vendor advisory or fix has been published. Record sourced from OSV.
github.com (Web)
nvd.nist.gov (Advisory)
github.com (Web)
github.com (Web)
github.com (Web)
These advisories are the same class of weakness (CWE-862: Missing Authorization) in other software:
Details
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
Affected Packages
| Software | From version | Fixed in |
|---|---|---|
| invenio-app-rdm | 7.0.0.dev0 | 7.0.0.dev5 |
| invenio-drafts-resources | 0.14.0 | 0.14.6 |
| invenio-rdm-records | 0.33.0 | 0.33.10 |
Free Vulnerability Check
BotEraser helps you identify potentially vulnerable plugins and themes by checking your installation against CVE-2021-43781 and other known CVE records.
Scan My Site Free →No credit card required · Results in minutes
ⓘ Data Notice: The information presented above has been compiled from publicly available internet sources. Boteraser aggregates this data solely for informational purposes and does not independently classify, evaluate, or endorse any findings about the vulnerabilities listed. The accuracy and completeness of this information is the sole responsibility of the original publishers. Boteraser and its operators accept no liability for any decisions made based on this data.
Stay up to date with the latest from Boteraser.
We use cookies to improve your experience on our site. By using our site, you consent to cookies.
Manage your cookie preferences below:
Essential cookies enable basic functions and are necessary for the proper function of the website.
CloudFlare provides web performance and security solutions, enhancing site speed and protecting against threats.
Service URL: developers.cloudflare.com (opens in a new window)
These cookies are needed for adding comments on this website.
These cookies are used for managing login functionality on this website.
Statistics cookies collect information anonymously. This information helps us understand how visitors use our website.
Google Analytics is a powerful tool that tracks and analyzes website traffic for informed marketing decisions.
Service URL: policies.google.com (opens in a new window)
You can find more information in our Cookie Policy and Privacy Policy.