VDB
EN
MEDIUM 4.3

GHSA-3vrh-m9w7-v94f

Wagtail: Improper restriction handling on Pages admin API

빠른 조치

GHSA-3vrh-m9w7-v94f — wagtail: 아래 명령으로 수정 버전으로 올리세요.

pip install --upgrade 'wagtail>=7.0.9'

상세

### Impact

The internal Pages admin [API](https://docs.wagtail.org/en/stable/advanced_topics/api/index.html) incorrectly returns page fields without access control when they are declared in `api_fields`. A user with access to the Wagtail admin can use this API to fetch draft and live page fields’ contents that are part of `api_fields` on the base page model (title, slug, seo_title, search_description), as well as all custom fields declared in `api_fields`.

The vulnerability is not exploitable by an ordinary site visitor without access to the Wagtail admin.

### Patches

Patched versions have been released as Wagtail 7.0.9, 7.3.4, 7.4.3 and 8.0rc2.

### Workarounds

Site owners unable to upgrade can apply the fix by overriding the relevant method on `PagesAdminAPIViewSet` to patch all vulnerable admin API endpoints:

```python # wagtail_hooks.py or AppConfig.ready()

from wagtail.admin.api.views import PagesAdminAPIViewSet from wagtail.permissions import page_permission_policy

def _restricted_get_base_queryset(self): return page_permission_policy.explorable_instances(self.request.user)

PagesAdminAPIViewSet.get_base_queryset = _restricted_get_base_queryset ```

### Acknowledgements

Many thanks to xuliang@QAX for reporting this issue.

### For more information

If you have any questions or comments about this advisory:

- Visit Wagtail's [support channels](https://docs.wagtail.org/en/stable/support.html) - Email us at [security@wagtail.org](mailto:security@wagtail.org) (view our [security policy](https://github.com/wagtail/wagtail/security/policy) for more information).

이 버전이 영향받나요?

사용 중인 패키지 버전을 입력하면 즉시 평가합니다.

영향 패키지

PyPI / wagtail
최초 영향 버전: 0 수정 버전: 7.0.9
수정 pip install --upgrade 'wagtail>=7.0.9'
PyPI / wagtail
최초 영향 버전: 7.1 수정 버전: 7.3.4
수정 pip install --upgrade 'wagtail>=7.3.4'
PyPI / wagtail
최초 영향 버전: 7.4 수정 버전: 7.4.3
수정 pip install --upgrade 'wagtail>=7.4.3'
PyPI / wagtail
최초 영향 버전: 8.0rc1 수정 버전: 8.0rc2
수정 pip install --upgrade 'wagtail>=8.0rc2'

참고