baserCMS administrative API authorization bypass through session fallback
影響パッケージ
| パッケージ | 影響を受ける版 → 修正版 | |
|---|---|---|
| baserprojectbasercms | — | 記載なし |
| Packagistbaserproject/baser-core |
5.3.0 未満→ 5.3.0 |
5.3.0 |
| composerbaserproject/baser-core |
5.3.0 未満→ 5.3.0 |
5.3.0 |
原文の説明 取得元が公開している説明をそのまま載せています (多くは英語)。
Summary
An authorization bypass occurs against the API endpoint /baser/api/admin/ by abusing the session authentication fallback.
Details
The mail settings are used here as an example.
Admin side:
https://github.com/baserproject/basercms/blob/master/plugins/baser-core/config/permission.php#L100
With auth => false, it is not accessible with operator privileges.
API side:
https://github.com/baserproject/basercms/blob/master/plugins/baser-core/config/permission.php#L286
With auth => true, it is accessible even with operator privileges.
First, the default group for operators has auth_prefix = 'Admin', which does not include Api/Admin.
Because of this condition, when trying to access the Api/Admin API with a JWT, operators have auth_prefix = 'Admin', so they cannot obtain a JWT and should not be able to access it.
However, there is a problem in getAuthenticationService.
https://github.com/baserproject/basercms/blob/master/plugins/baser-core/src/BaserCorePlugin.php#L507
Here, session authentication is enabled even for the Api/Admin prefix.
By accessing the API with a Referer header, session authentication becomes active, allowing access to the API without holding a JWT.
As a result, all APIs configured with auth => true in permission.php become accessible by operators.
PoC
- Log in with a site operator (operator) privile…
出典: CVE.org (CVE Program・cvelistV5) NVD GitHub Advisory
参照URL
- advisory github.com
- package github.com
- web github.com
- web github.com
- web github.com
- web github.com
- web nvd.nist.gov
- web github.com