baserCMS has Mail Form Acceptance Bypass via Public API
Summary
The imported advisory is rated medium severity. It identifies 1 affected package; whether you are affected depends on your installed version. It is not listed in the imported CISA KEV data; that does not establish that exploitation has not occurred.
Summary by cve.new · CC BY 4.0Original source description
Summary
A public mail submission API allows unauthenticated users to submit mail form entries even when the corresponding form is not accepting submissions. This bypasses administrative controls intended to stop form intake and enables spam or abuse via the API.
Details
In baserCMS, mail form submissions through the front-end UI are guarded by acceptance checks implemented in MailFrontService::isAccepting(), which ensures that the mail form is currently accepting submissions (e.g. within its configured publish/acceptance window).
These checks are enforced in the UI flow handled by MailController::index() and MailController::confirm()
(e.g. plugins/bc-mail/src/Controller/MailController.php).
However, the public API endpoint:
plugins/bc-mail/src/Controller/Api/MailMessagesController.php::add()
does not invoke MailFrontService::isAccepting() and does not verify whether the mail form is currently accepting submissions. As a result, the API accepts submissions regardless of the form’s acceptance state.
The endpoint does not require authentication. A valid CSRF cookie and token pair is sufficient to create a mail message. This allows submissions even when administrators intentionally disable or close the mail form via the admin UI.
PoC
- In the admin UI, configure a mail form so that it is not accepting submissions (e.g. outside its acceptance period or explicitly closed).
- Obtain a CSRF cookie by accessing the site root:
curl -sS -D - -o - -c /tmp/basercms_cookies.txt 'http://localhost/'
- Extract the CSRF token from the
csrfTokencookie and submit a POST request to the public API endpoint:
curl -sS -D - -o - -X POST 'http://localhost/baser/api/bc-mail/mail_messages/add/1.json'
-H 'Content-Type: application/x-www-form-urlencoded'
-H 'Referer: http://localhost/'
-H 'X-CSRF-Token: <csrf-token-from-cookie>'
-b /tmp/basercms_cookies.txt
--data-urlencode 'name_1=Test'
--data-urlencode 'name_2=User'
--data-urlencode 'email_1=test@example.com'
--data-urlencode 'email_2=test@example.com'
--data-urlencode 'category[]=資料請求'
--data-urlencode 'root=検索エンジン'
--data-urlencode 'message=API bypass test'
- The server responds with
200 OKand creates a mail message, even though the form is configured to reject submissions.
Impact
This is an access control / business logic bypass vulnerability.
Administrators rely on the mail form acceptance settings to temporarily or permanently stop form intake (e.g. during maintenance, incidents, or spam attacks). This vulnerability allows attackers to bypass those controls via the public API, enabling unauthorized mail submissions, spam, and operational disruption.
Affected packages
Start with the recorded fix for your release branch. Check your installed version and test compatibility before upgrading. Fixing this advisory does not rule out other vulnerabilities in the release.
Earlier releases before 5.2.3
Fixed in 5.2.3
155 explicitly affected versions
0.0.1, 0.0.2, 0.0.3, 0.0.4, 0.0.5, 0.0.6, 0.0.7, 0.0.8, 1.0.0, 2.0.0-rc1, 2.0.0-rc2, 2.0.0-rc3, 2.0.0-rc4, 2.0.0-rc5, 2.0.0-rc6, 3.0.10, 3.0.10.1, 3.0.11, 3.0.11.1, 3.0.12, 3.0.13, 3.0.14, 3.0.15, 3.0.16, 3.0.17, 3.0.18, 3.0.19, 3.0.20, 3.0.21, 3.0.22, 3.0.23, 3.0.24, 3.0.25, 3.0.26, 3.0.7, 3.0.7.1, 3.0.8, 3.0.8.1, 3.0.9, 3.0.9.1, 4.0.0, 4.0.0-beta, 4.0.1, 4.0.10, 4.0.10.1, 4.0.11, 4.0.2, 4.0.2.1, 4.0.3, 4.0.4, 4.0.5, 4.0.5.1, 4.0.5.2, 4.0.6, 4.0.7, 4.0.8, 4.0.9, 4.1.0, 4.1.0.1, 4.1.1, 4.1.2, 4.1.3, 4.1.4, 4.1.5, 4.1.6, 4.1.7, 4.1.8, 4.2.0, 4.2.1, 4.2.2, 4.2.3, 4.2.4, 4.2.5, 4.3.0, 4.3.1, 4.3.2, 4.3.3, 4.3.4, 4.3.5, 4.3.6, 4.3.7, 4.3.7.1, 4.4.0, 4.4.1, 4.4.1.1, 4.4.2, 4.4.2.1, 4.4.3, 4.4.4, 4.4.5, 4.4.6, 4.4.7, 4.4.8, 4.5.0, 4.5.1, 4.5.2, 4.5.3, 4.5.4, 4.5.5, 4.5.6, 4.6.0, 4.6.1, 4.6.1.1, 4.6.2, 4.6.3, 4.7.0, 4.7.2, 4.7.3, 4.7.5, 4.7.6, 4.7.7, 4.7.8, 4.8.0, 4.8.1, 4.8.2, 4.8.3, 5.0.0, 5.0.0-beta1, 5.0.0-beta2, 5.0.0-beta3, 5.0.0-beta4, 5.0.1, 5.0.10, 5.0.11, 5.0.12, 5.0.14, 5.0.15, 5.0.16, 5.0.17, 5.0.18, 5.0.19, 5.0.2, 5.0.20, 5.0.21, 5.0.3, 5.0.4, 5.0.5, 5.0.6, 5.0.7, 5.0.8, 5.0.9, 5.1.0, 5.1.1, 5.1.10, 5.1.2, 5.1.3, 5.1.4, 5.1.5, 5.1.6, 5.1.7, 5.1.8, 5.1.9, 5.2.0, 5.2.1, 5.2.2
View affected-version evidence
{
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "5.2.3"
}
],
"type": "ECOSYSTEM"
}
],
"versions": [
"0.0.1",
"0.0.2",
"0.0.3",
"0.0.4",
"0.0.5",
"0.0.6",
"0.0.7",
"0.0.8",
"1.0.0",
"2.0.0-rc1",
"2.0.0-rc2",
"2.0.0-rc3",
"2.0.0-rc4",
"2.0.0-rc5",
"2.0.0-rc6",
"3.0.10",
"3.0.10.1",
"3.0.11",
"3.0.11.1",
"3.0.12",
"3.0.13",
"3.0.14",
"3.0.15",
"3.0.16",
"3.0.17",
"3.0.18",
"3.0.19",
"3.0.20",
"3.0.21",
"3.0.22",
"3.0.23",
"3.0.24",
"3.0.25",
"3.0.26",
"3.0.7",
"3.0.7.1",
"3.0.8",
"3.0.8.1",
"3.0.9",
"3.0.9.1",
"4.0.0",
"4.0.0-beta",
"4.0.1",
"4.0.10",
"4.0.10.1",
"4.0.11",
"4.0.2",
"4.0.2.1",
"4.0.3",
"4.0.4",
"4.0.5",
"4.0.5.1",
"4.0.5.2",
"4.0.6",
"4.0.7",
"4.0.8",
"4.0.9",
"4.1.0",
"4.1.0.1",
"4.1.1",
"4.1.2",
"4.1.3",
"4.1.4",
"4.1.5",
"4.1.6",
"4.1.7",
"4.1.8",
"4.2.0",
"4.2.1",
"4.2.2",
"4.2.3",
"4.2.4",
"4.2.5",
"4.3.0",
"4.3.1",
"4.3.2",
"4.3.3",
"4.3.4",
"4.3.5",
"4.3.6",
"4.3.7",
"4.3.7.1",
"4.4.0",
"4.4.1",
"4.4.1.1",
"4.4.2",
"4.4.2.1",
"4.4.3",
"4.4.4",
"4.4.5",
"4.4.6",
"4.4.7",
"4.4.8",
"4.5.0",
"4.5.1",
"4.5.2",
"4.5.3",
"4.5.4",
"4.5.5",
"4.5.6",
"4.6.0",
"4.6.1",
"4.6.1.1",
"4.6.2",
"4.6.3",
"4.7.0",
"4.7.2",
"4.7.3",
"4.7.5",
"4.7.6",
"4.7.7",
"4.7.8",
"4.8.0",
"4.8.1",
"4.8.2",
"4.8.3",
"5.0.0",
"5.0.0-beta1",
"5.0.0-beta2",
"5.0.0-beta3",
"5.0.0-beta4",
"5.0.1",
"5.0.10",
"5.0.11",
"5.0.12",
"5.0.14",
"5.0.15",
"5.0.16",
"5.0.17",
"5.0.18",
"5.0.19",
"5.0.2",
"5.0.20",
"5.0.21",
"5.0.3",
"5.0.4",
"5.0.5",
"5.0.6",
"5.0.7",
"5.0.8",
"5.0.9",
"5.1.0",
"5.1.1",
"5.1.10",
"5.1.2",
"5.1.3",
"5.1.4",
"5.1.5",
"5.1.6",
"5.1.7",
"5.1.8",
"5.1.9",
"5.2.0",
"5.2.1",
"5.2.2"
]
}