Your RSA-2048 keys break in 2030. Find every one of them before attackers do.
🐍
🐍 PyPI
Not in CISA KEV
MEDIUM severity

CVE-2021-43781 — invenio-drafts-resources

MEDIUMFix: inveniosoftware/invenio-drafts-resources@039b0cf

CVE-2021-43781 is a medium-severity (CVSS 4.3) CWE-862 vulnerability in invenio-drafts-resources. 1 public exploit reference exists, so weaponization risk is real. A fix is available for invenio-drafts-resources — see the affected versions and patch details below.

Permissions not properly checked in Invenio-Drafts-Resources

Also known asGHSA-xr38-w74q-r8jvPYSEC-2021-836PYSEC-2021-837PYSEC-2021-838
Published
Updated
Affected
6 pkgs
Patched
6 / 6
Exploits
1 known
Exploitation data as of Oct 3, 2026 · OSV.dev, NVD, FIRST.org (EPSS)

EPSS Exploitation Probability

via FIRST.org ↗
0.7%probability of exploitation in next 30 days
Lower Risk0.00%
Lower risk than most CVEs51th percentile — riskier than 51% of all scored CVEsHighest risk
0.00%0.39%0.79%1.18%0.1%0.7%Apr 26Aug 26Oct 26

Probability of exploitation in the next 30 days, from FIRST.org EPSS.

How urgent is this, really

CVE-2021-43781 by exploitation likelihood (EPSS) against impact (CVSS). Outside the shaded patch-first corner.

Where this sits among everything scored

Of 385,386 CVEs with a current EPSS score, this one falls in the < 10% band (highlighted). Counts from FIRST.org, log-scaled.

Real-World Exposure

6 pkgs affected
🐍invenio-drafts-resources🐍invenio-app-rdm🐍invenio-rdm-records🐍invenio-drafts-resources🐍invenio-rdm-records🐍invenio-app-rdm

Real-time download stats are indexed for npm and PyPI packages. This vulnerability affects PyPI packages — download data is not available via public APIs for these ecosystems.

Description

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:

Affected Packages

6 total 6 fixed
EcosystemPackageVulnerable rangeFix
🐍PyPIinvenio-drafts-resourcesall versions0.13.7pip install --upgrade 'invenio-drafts-resources==0.13.7'
🐍PyPIinvenio-app-rdmall versions6.0.5pip install --upgrade 'invenio-app-rdm==6.0.5'
🐍PyPIinvenio-rdm-recordsall versions0.32.6pip install --upgrade 'invenio-rdm-records==0.32.6'
🐍PyPIinvenio-drafts-resources≥ 0.14.0&&< 0.14.60.14.6pip install --upgrade 'invenio-drafts-resources==0.14.6'
🐍PyPIinvenio-rdm-records≥ 0.33.0&&< 0.33.100.33.10pip install --upgrade 'invenio-rdm-records==0.33.10'
🐍PyPIinvenio-app-rdm≥ 7.0.0.dev0&&< 7.0.0.dev57.0.0.dev5pip install --upgrade 'invenio-app-rdm==7.0.0.dev5'

Affected Products

1 product · 2 configurations
Application
invenio-drafts-resourcesinveniosoftware
≥ 0.14.0 && < 0.14.6
range
Exploits & PoCs
1

Research use only. For defensive security, authorized penetration testing, and academic research only. Never execute exploit code against systems without explicit written authorization.

Detection & mitigation playbook

Open-source dependency
  1. Detect

    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for invenio-drafts-resources, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.

  2. Fix

    Update invenio-drafts-resources to 0.13.7 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2021-43781 is resolved across your whole dependency graph.

  3. Workarounds

    Put an independent control in front of the weakness: restrict the affected endpoint or interface to trusted networks, require an additional authentication factor or proxy-level check, and invalidate existing sessions and credentials in case the flaw has already been used.

Frequently Asked Questions

### 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: ```python def publish(..
O3 Security · Impact-Aware SCA

Is CVE-2021-43781 in your dependencies?

Find it across PyPI, including transitive dependencies.

CVE-2021-43781: invenio-drafts-resources — Fixed in 0.13.7