Логотип exploitDog
Консоль
Логотип exploitDog

exploitDog

github логотип

GHSA-xr38-w74q-r8jv

Опубликовано: 06 дек. 2021
Источник: github
Github: Прошло ревью
CVSS4: 5.1
CVSS3: 6.4

Описание

Permissions not properly checked in Invenio-Drafts-Resources

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:

Пакеты

Наименование

invenio-drafts-resources

pip
Затронутые версииВерсия исправления

< 0.13.7

0.13.7

Наименование

invenio-app-rdm

pip
Затронутые версииВерсия исправления

< 6.0.5

6.0.5

Наименование

invenio-rdm-records

pip
Затронутые версииВерсия исправления

< 0.32.6

0.32.6

Наименование

invenio-drafts-resources

pip
Затронутые версииВерсия исправления

>= 0.14.0, < 0.14.6

0.14.6

Наименование

invenio-rdm-records

pip
Затронутые версииВерсия исправления

>= 0.33.0, < 0.33.10

0.33.10

Наименование

invenio-app-rdm

pip
Затронутые версииВерсия исправления

>= 7.0.0.dev0, < 7.0.0.dev5

7.0.0.dev5

EPSS

Процентиль: 35%
0.00144
Низкий

5.1 Medium

CVSS4

6.4 Medium

CVSS3

Дефекты

CWE-862
CWE-863

Связанные уязвимости

CVSS3: 6.4
nvd
около 4 лет назад

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.

EPSS

Процентиль: 35%
0.00144
Низкий

5.1 Medium

CVSS4

6.4 Medium

CVSS3

Дефекты

CWE-862
CWE-863