GHSA-xr38-w74q-r8jv
MEDIUMPermissions not properly checked in Invenio-Drafts-Resources
EPSS Exploitation Probability
EPSS (Exploit Prediction Scoring System) is a daily probability model maintained by FIRST.org. It estimates the likelihood a CVE will be exploited in production environments within the next 30 days, derived from real-world threat intelligence signals.
Blast Radius
invenio-drafts-resources🐍invenio-app-rdm🐍invenio-rdm-records🐍invenio-drafts-resources🐍invenio-rdm-records🐍invenio-app-rdmReal-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:
- Chat with us on Discord: https://discord.gg/8qatqBC
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 🐍PyPI | invenio-drafts-resources | all versions | 0.13.7 |
| 🐍PyPI | invenio-app-rdm | all versions | 6.0.5 |
| 🐍PyPI | invenio-rdm-records | all versions | 0.32.6 |
| 🐍PyPI | invenio-drafts-resources | ≥ 0.14.0&&< 0.14.6 | 0.14.6 |
| 🐍PyPI | invenio-rdm-records | ≥ 0.33.0&&< 0.33.10 | 0.33.10 |
| 🐍PyPI | invenio-app-rdm | ≥ 7.0.0.dev0&&< 7.0.0.dev5 | 7.0.0.dev5 |
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 dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for invenio-drafts-resources. O3's reachability analysis confirms whether the vulnerable code path is actually invoked in your application, so you act on real exposure instead of every transitive match.
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 GHSA-xr38-w74q-r8jv is resolved across your whole dependency graph.
Workarounds
If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.
How O3 protects you
O3 pinpoints whether GHSA-xr38-w74q-r8jv is reachable in your code and exactly where to fix it, then blocks exploitation in production at runtime until the patched version is deployed.
Tailored to GHSA-xr38-w74q-r8jv. Runtime protection reduces exposure until a permanent patch is applied and verified — it complements patching, it doesn't replace it.
Frequently Asked Questions
Is GHSA-xr38-w74q-r8jv in your dependencies?
O3 detects GHSA-xr38-w74q-r8jv across PyPI dependencies and uses function-level reachability to confirm whether the vulnerable code path is actually reachable — not just present. No false positives.