79% vs 51%: independent neobanks lag on app security. Read the report

Deep Dive

Deep Dive

Databasement RCE via Toast Icon Template Injection (CVE-2026-138223)

Databasement through 1.7.12 passes a Livewire toast icon into a Blade template, giving an invited or signed-in user PHP execution; 1.7.13 fixes it.

TL;DR

  • Databasement builds a Blade template from the icon argument of its toast helpers. An invited visitor or any signed-in user can call those public Livewire methods and run PHP.
  • The CVE record lists 1.7.0 through 1.7.12 as affected. The repository advisory names 1.7.14 as the safe release and says every earlier version is affected.
  • VulDB rates it CVSS v3.1 10.0 Critical; the repository advisory shows 9.8. No exploitation is known and no public proof of concept exists; it is not in CISA KEV as of 2026-11-30.
  • Upgrade to 1.7.14 or later and revoke outstanding invitations, because a valid invitation link is the unauthenticated path. See "How do I fix it?".

Am I affected?

A Databasement instance is exposed when it runs an affected build and an attacker can reach a Livewire component that uses the toast helpers. All of these conditions must hold:

  • The instance runs Databasement 1.7.12 or earlier, or any build whose Toast trait still declares toast, success, warning, error or info as public.
  • The Livewire endpoint is reachable from the attacker's network position.
  • The attacker can load a component that uses the trait, either as a signed-in user of any role or through a valid, unaccepted invitation.

The invitation page is public, so an invited person reaches the component before creating an account. The advisory says the helper methods sat on the client-facing method surface of every component that used them. It also says Livewire does not cover the method-call portion of an update request with the component snapshot integrity check.

Branch Affected versions Fixed version
1.7.x 1.7.0 through 1.7.12 1.7.13 contains the toast patch; the advisory names 1.7.14
Earlier releases Not listed in the CVE record; the advisory says every version before 1.7.14 1.7.14

For a container, read the build version from the environment:

docker exec databasement printenv APP_VERSION
docker exec databasement grep -n "public function toast" app/Traits/Toast.php

The first command prints the version the image was built with. The second prints the vulnerable method declaration when the trait is still public. A source install keeps the version in .env:

grep -E '^APP_VERSION=' .env
grep -n "public function toast" app/Traits/Toast.php

The fixed release declares protected function toast( and the other helpers as protected. If the grep prints a public declaration, the build still exposes the method surface.

How do I fix it?

Upgrade to 1.7.14 or later. The 1.7.13 release already contains the toast patch, and 1.7.14 adds invitation re-verification and is the version the repository advisory names.

For Docker, pull the fixed tag and recreate the container with the same environment and volumes:

  1. Back up the database and the databasement-data volume.
  2. Pull the fixed image.
  3. Stop and remove the old container.
  4. Start a new container from the fixed image.
docker pull davidcrty/databasement:1.7.14
docker stop databasement
docker rm databasement
docker run -d --name databasement -p 2226:2226 \
  -e DB_CONNECTION=sqlite \
  -e DB_DATABASE=/data/database.sqlite \
  -e ENABLE_QUEUE_WORKER=true \
  -v ./databasement-data:/data \
  davidcrty/databasement:1.7.14

Replace the environment values with the ones your deployment uses. For Docker Compose, run docker compose pull and then docker compose up -d --force-recreate.

For a source install, check out the release tag, install dependencies, and run the migrations:

git fetch --tags
git checkout v1.7.14
composer install --no-dev --optimize-autoloader
php artisan migrate --force

Revoke every outstanding, unaccepted invitation. The advisory says invitation tokens do not expire, and an invitation link is the unauthenticated path to the component. Delete pending invitations in the application, or clear users.invitation_token for rows where invitation_accepted_at is null if you must do it in the database.

No configuration change makes an affected version safe. If you cannot upgrade at once, restrict network access to the instance to trusted operators. That limits who can reach the Livewire endpoint but leaves the code vulnerable.

After upgrading, treat every secret a compromised instance could decrypt as exposed. Rotate the managed database passwords, SSH private keys, and object-store secrets the instance stores.

What is the root cause?

The toast helper concatenates the caller-supplied icon value into a Blade template string and renders it, so the value becomes template source rather than data.

app/Traits/Toast.php at version 1.7.12 declares toast() and the four wrappers as public methods. The $icon argument is inserted between single quotes in a component tag, and the result goes to Blade::render():

public function toast(
    string $type,
    string $title,
    ?string $description = null,
    ?string $position = null,
    string $icon = 'o-information-circle',
    string $css = 'alert-info',
    int $timeout = 6000,
    ?string $redirectTo = null,
    bool $noProgress = false,
    ?string $progressClass = null,
    ?string $flashAs = null,
): ?Redirector {
    $toast = [
        'type' => $type,
        'title' => $title,
        'description' => $description,
        'position' => $position,
        'icon' => Blade::render("<x-mary-icon class='w-7 h-7' name='".$icon."' />"),

A single quote in $icon closes the attribute value, and the rest of the value becomes template markup. Blade compiles that markup with the application's compiler and evaluates it in the PHP process, so a directive that runs PHP executes with the application's privileges.

The method is public, so Livewire treats it as a client-callable component action. The same is true of success(), warning(), error() and info(), which forward their own $icon argument to toast(). The advisory says the method-call portion of a Livewire update request is not covered by the component snapshot integrity check.

AcceptInvitation uses the trait and is a public page. Its mount() method validates the token before the page renders:

public function mount(string $token): void
{
    $this->token = $token;

    $user = User::where('invitation_token', $token)
        ->whereNull('invitation_accepted_at')
        ->first();

    if (! $user) {
        abort(404, 'Invalid or expired invitation link.');
    }

    $this->user = $user;
}

That check is why the unauthenticated path needs a valid, unaccepted invitation token. The render itself does not remove the public toast methods from the component.

How is it exploited?

  1. The attacker obtains a valid, unaccepted invitation link, or signs in to an account of any role.
  2. The attacker loads the Livewire component, either the invitation page or any page that uses the toast trait.
  3. The attacker sends a Livewire update request that calls a public toast method with an icon argument containing Blade template syntax.
  4. The wrapper passes the value to toast(), which concatenates it into the template string.
  5. Blade::render() compiles and evaluates the string in the application process.
  6. PHP code in the template runs as the application user.

No public proof of concept or request body has been published. The advisory withholds a working proof of concept to protect instances that have not upgraded.

How does the attack flow?

An invitation link or a signed-in session reaches a public toast method whose unvalidated icon is compiled as Blade, so the template runs PHP as the application user.

flowchart LR A["Invitation link or signed-in session"] --> B["Livewire calls public toast method"] B --> C["icon concatenated into Blade template"] C --> D["Blade::render compiles the template"] D --> E["PHP runs as application user"] E --> F["Managed database and SSH secrets exposed"]

What can an attacker do?

An attacker can run arbitrary PHP as the application user. The advisory says the result is a complete loss of confidentiality, integrity, and availability for every tenant on the instance.

Databasement holds the key and ciphertext for the credentials it manages. An attacker who reaches code execution can decrypt and exfiltrate managed database passwords, SSH private keys, and object-store secrets. The attacker can also read or tamper with every tenant's backups.

The conditions are a valid invitation token or any account, a reachable Livewire endpoint, and a component that uses the trait. The invitation path needs no account but does need an outstanding invitation. No public source demonstrates a specific payload or a victim.

VulDB rates it CVSS v3.1 10.0, CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H. The repository advisory's 9.8 uses CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H.

Why does the fix work?

The fix removes the helpers from the client-callable surface and stops concatenating the icon into template source. Commit 713f71f changes the method visibility and binds the icon as a component attribute:

-    public function toast(
+    protected function toast(
...
-            'icon' => Blade::render("<x-mary-icon class='w-7 h-7' name='".$icon."' />"),
+            'icon' => Blade::render('<x-mary-icon class="w-7 h-7" :name="$name" />', [
+                'name' => preg_match('/\A[A-Za-z0-9._-]+\z/', $icon) === 1 ? $icon : self::FALLBACK_ICON,
+            ]),

The same commit changes success(), warning(), error() and info() to protected. Livewire can no longer call them from a client update, so the attacker cannot supply the icon argument.

The allow-list accepts letters, digits, dots, underscores, and hyphens. The icon is passed as the name data of the component, not as template source. A value outside the allow-list becomes the fallback icon.

The patch is complete for this trait. The 1.7.14 release adds a second fix that re-verifies the invitation, which hardens the public invitation path.

How do I check if I was compromised?

No vendor or researcher has published indicators of compromise. The advisory describes the mechanism and withholds a proof of concept, so an attempt that failed may leave no trace.

Review the Laravel log for Blade compilation errors and Livewire request errors around the invitation page:

grep -Ei 'blade|livewire|toast' storage/logs/laravel.log

A hit is a lead, not proof. Normal template errors also produce Blade entries. Check the request time and the account or invitation involved.

Review the web server log for Livewire update requests from unexpected addresses:

grep -Ei 'POST /livewire/update' /var/log/nginx/access.log

Most access logs do not record request bodies, so this search finds the endpoint and the source address only. Check the pending invitations and the user list for accounts you did not create.

Look for changes a compromised instance could make: new admin users, changed backup destinations, unexpected outbound connections, and files under the application directory that the deployment did not create. If you find any, rotate the managed database passwords, SSH private keys, and object-store secrets from a different machine.

Timeline

  • 2026-09-06: Commit 713f71f lands and Databasement 1.7.13 is released.
  • 2026-09-07: Databasement 1.7.14 is released and the repository advisory is published.
  • 2026-11-28: The CVE identifier is reserved.
  • 2026-11-29: VulDB publishes CVE-2026-138223 with CVSS v3.1 10.0.

From fix to CVE publication in 84 days
Figure 1: Databasement shipped the toast patch on 2026-09-06, released 1.7.14 and the advisory on 2026-09-07, and published the CVE on 2026-11-29. Source: Databasement releases, fix commit and CVE record, checked November 30, 2026

FAQ

Is 1.7.13 enough?

Yes for this flaw. The 1.7.13 release contains commit 713f71f, which removes the public methods and validates the icon. The advisory names 1.7.14, which also re-verifies invitations, so 1.7.14 or later is the safer floor.

Does an attacker need an account?

Not always. A valid, unaccepted invitation link reaches the public invitation page before an account exists. Any signed-in user of any role can reach the post-authentication path.

Do invitation tokens expire?

No. The advisory says invitation tokens do not expire, so revoke outstanding invitations. Deleting or clearing the token is the only way to close that path on an affected build.

Is there a public proof of concept?

No. The advisory withholds a working proof of concept. The vulnerable line, the fix commit, and the patch diff are public.

Is it exploited in the wild?

No exploitation is known and it is not in CISA KEV as of 2026-11-30. The CVE record and the repository advisory publish no campaign data.

What data is at risk after exploitation?

Managed database passwords, SSH private keys, object-store secrets, and every tenant's backups, according to the advisory. Databasement stores the key and ciphertext for the credentials it manages, so code execution reaches all of them.

References

  • VulDB, CVE-2026-138223 record, published 2026-11-29 (checked November 30, 2026): https://www.cve.org/CVERecord?id=CVE-2026-138223
  • Databasement, repository advisory GHSA-76f6-wp5v-23c2, published 2026-09-07 (checked November 30, 2026): https://github.com/David-Crty/databasement/security/advisories/GHSA-76f6-wp5v-23c2
  • Databasement, fix commit 713f71f, "fix(security): keep the toast helpers out of the component public API", committed 2026-09-06 (checked November 30, 2026): https://github.com/David-Crty/databasement/commit/713f71f5336663493e8c4dc07e7f3e96a291775b
  • Databasement, pull request 605, "keep the toast helpers out of the component public API" (checked November 30, 2026): https://github.com/David-Crty/databasement/pull/605
  • Databasement, v1.7.13 release, published 2026-09-06 (checked November 30, 2026): https://github.com/David-Crty/databasement/releases/tag/v1.7.13
  • Databasement, v1.7.14 release, published 2026-09-07 (checked November 30, 2026): https://github.com/David-Crty/databasement/releases/tag/v1.7.14
  • Databasement source at v1.7.12, app/Traits/Toast.php (checked November 30, 2026): https://github.com/David-Crty/databasement/blob/v1.7.12/app/Traits/Toast.php
  • Databasement source at v1.7.12, app/Livewire/Auth/AcceptInvitation.php (checked November 30, 2026): https://github.com/David-Crty/databasement/blob/v1.7.12/app/Livewire/Auth/AcceptInvitation.php
  • Docker Hub, davidcrty/databasement, 1,130,894 pulls (checked November 30, 2026): https://hub.docker.com/r/davidcrty/databasement
  • Databasement repository, 2,645 stars and 300 forks (checked November 30, 2026): https://github.com/David-Crty/databasement
  • CISA, Known Exploited Vulnerabilities Catalog, checked 2026-11-30 (checked November 30, 2026): https://www.cisa.gov/known-exploited-vulnerabilities-catalog

Free scan

Scan your own app for free

or book a demo

Keep reading

Related articles

Browse the blog