# CVE-2026-87821: Lara Dashboard 0.9.2 through 1.3.1 Server-Side Request Forgery in Builder Markdown Fetch

The Markdown version of <https://upatch.dev/cve/CVE-2026-87821>. Last updated 25 Nov 2026.

## At a glance

CVE-2026-87821 is rated High 7.1 (CVSS 4.0, CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:L/VA:N/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X). It affects Lara Dashboard (laradashboard) and was published on 9 Sept 2026. It is not in CISA's Known Exploited Vulnerabilities catalog. Its EPSS score is 0.5%: the estimated chance it is exploited in the next 30 days, as of 25 Nov 2026. The upatch `cve-2026-87821-ssrf-block` mitigates it, and is vetted (merged into the registry).

A upatch is a signed BPF program that shirudo loads into a running Linux kernel to block the code path this CVE's exploit takes. It holds the line until the fix ships; it does not replace patching.

## The vulnerability

CVE-2026-87821 (GHSA-4xqv-4c27-6c4j), published on 9 September 2026, is a Server-Side Request Forgery vulnerability in Lara Dashboard versions 0.9.2 through 1.3.1. In `App\Http\Controllers\Api\Builder\MarkdownController::fetch()`, the `POST /api/admin/builder/markdown/fetch` route accepts an arbitrary URL from any authenticated user (including low-privilege `Subscriber` accounts) and passes it to `App\Services\Builder\MarkdownFetchService::fetchAndConvert()`. That service validates only that the input is a syntactically valid URL (`filter_var($url, FILTER_VALIDATE_URL)`) before issuing an HTTP GET request with `Http::timeout(30)->get($rawUrl)` and returning the converted response body in the JSON reply. Because there is no host allow-list, private/reserved IP check or redirect restriction prior to 1.3.2, an authenticated user can make the server fetch internal HTTP services, probe internal ports, or read cloud instance metadata endpoints such as `169.254.169.254`.

### Official description

Lara Dashboard through 1.3.1 contains a server-side request forgery vulnerability in the POST /api/admin/builder/markdown/fetch endpoint that allows any authenticated user to fetch arbitrary URLs and read the response body. Attackers can read internal HTTP services and cloud metadata including IAM credentials by supplying malicious URLs without host validation or redirect restrictions.

## What the upatch does

Two BPF LSM programs attach to `lsm/socket_connect` and `lsm/socket_sendmsg` and return `-EPERM` when a PHP process (`php`, `php-fpm*`, `php-cgi*` or `php8.*`, matched by task `comm` or executable dentry name) attempts to connect or send to an internal or metadata IPv4 or IPv6 address:

| Hook                 | Refused                                                                                                                                                                                                                                         |
| -------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `lsm/socket_connect` | Connecting an `AF_INET` or `AF_INET6` socket from a PHP process to a loopback, RFC 1918 private, RFC 6598 CGNAT, link-local (`169.254.0.0/16`, `fe80::/10`) or IPv6 unique-local (`fc00::/7`) address on any port other than 3306, 5432 or 6379 |
| `lsm/socket_sendmsg` | Sending a message with an explicit destination address (`msg_name`) from a PHP process to those same internal and metadata address ranges and ports                                                                                             |

Connections to standard database and cache ports (`3306` for MySQL, `5432` for PostgreSQL, `6379` for Redis) are permitted so Lara Dashboard's configured database and Redis connections continue to work on localhost or a private network, while outbound HTTP fetches to internal services and cloud metadata fail immediately in the kernel. Public internet connections (such as fetching markdown from `raw.githubusercontent.com`, `gitlab.com` or `bitbucket.org`, the hosts `SafeUrlValidator` allows in 1.3.2) are unaffected.

The `refused` per-CPU array map counts refused connection and send attempts at key 0.

The policy: [`cve-2026-87821-ssrf-block.bpf.c`](https://github.com/copper-helm/upatch-registry/tree/main/upatches/cve-2026-87821), 192 lines of BPF C attached at `lsm/socket_connect` and `lsm/socket_sendmsg`, licensed GPL-2.0 OR BSD-2-Clause.

## Side effects

- Outbound connections from PHP processes to loopback (`127.0.0.0/8`, `::1`), unspecified (`0.0.0.0/8`, `::`), RFC 1918 private (`10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`), CGNAT (`100.64.0.0/10`), link-local (`169.254.0.0/16`, `fe80::/10`) and IPv6 ULA (`fc00::/7`) addresses on ports other than 3306, 5432 and 6379 fail with `EPERM`.
- In Lara Dashboard, `POST /api/admin/builder/markdown/fetch` returns HTTP 422 (`Failed to fetch content: cURL error 7`) when given an internal or metadata URL, while normal dashboard operations and markdown fetches from public hosts continue to work.
- If a PHP application on the same host connects to a local HTTP service (such as a local Ollama, Meilisearch or SMTP server on a non-standard port) over TCP, those connections will also be refused while the upatch is loaded.

## Preemption model and cost

The programs keep no state beyond the `refused` per-CPU counter, which is updated with `__sync_fetch_and_add`, making them safe under every preemption model including preemptible RCU and `PREEMPT_RT`. On every `socket_connect` and unconnected `socket_sendmsg`, the program checks the address family and destination IP range first before inspecting the current task's command or executable name, so Unix domain sockets and connections to public IP addresses return after a few integer comparisons.

## Affected versions

Lara Dashboard versions 0.9.2 through 1.3.1 are affected; version 1.3.2 fixes the vulnerability in commit `738cc1a219ce459323ef1d09c3789075f1b8d2f2` by introducing `App\Support\Security\SafeUrlValidator` and disabling HTTP redirects.

The upatch uses the `socket_connect` and `socket_sendmsg` LSM hooks, which are present on all Linux kernels that support shirudo.

## How it was tested

On a vulnerable Lara Dashboard 1.3.1 instance, the loaded upatch refused the server-side markdown fetch to an internal loopback HTTP listener while normal login and API requests kept working.

- **Tested:** 25 Nov 2026
- **Target:** Lara Dashboard 1.3.1 on PHP 8.3.13, SQLite, loopback only
- **Kernel:** 7.4-shirudo-ci-20261123
- **Architecture:** x86_64
- **Machine:** shirudo test VM
- **Distribution:** Ubuntu 26.04

### Results

| State           | POST /api/admin/builder/markdown/fetch to internal 127.0.0.1 listener |
| --------------- | --------------------------------------------------------------------- |
| Before loading  | reached (HTTP 200, body disclosed)                                    |
| Upatch loaded   | blocked (HTTP 422, connect refused in kernel)                         |
| After unloading | reached (HTTP 200, body disclosed)                                    |

## How to apply

Build the upatch from source, sign it with your own shirudo key, and publish it to your own OCI registry. Machines that follow your upatch tree load it within about a minute.

Build and sign:

```sh
git clone https://github.com/copper-helm/upatch-registry
cd upatch-registry
tools/build <shirudo-checkout> <keys-dir> 1.0.0 upatches/cve-2026-87821
```

Publish and roll out:

```sh
shirudo bpm push build/packages/cve-2026-87821-1.0.0.bee oci://<registry>/<namespace>/cve-2026-87821 --keys-dir <keys-dir>
shirudo bpm tree append build/packages/cve-2026-87821-1.0.0.bee oci://<registry>/<namespace>/<tree> --tree-id <tree-id> --keys-dir <keys-dir>
```

## Review

- Contributors: romanlab.
- Reviewers: none recorded yet.

## Sources and links

- [CVE-2026-87821 record (CVE API)](https://cveawg.mitre.org/api/cve/CVE-2026-87821)
- [GitHub Security Advisory GHSA-4xqv-4c27-6c4j](https://github.com/laradashboard/laradashboard/security/advisories/GHSA-4xqv-4c27-6c4j)
- [Fix commit 738cc1a219ce](https://github.com/laradashboard/laradashboard/commit/738cc1a219ce459323ef1d09c3789075f1b8d2f2)
- [Lara Dashboard v1.3.2 release](https://github.com/laradashboard/laradashboard/releases/tag/v1.3.2)

### Links

- [CVE-2026-87821 on upatch.dev](https://upatch.dev/cve/CVE-2026-87821) (this page, as HTML)
- [NVD](https://nvd.nist.gov/vuln/detail/CVE-2026-87821)
- [CVE.org](https://www.cve.org/CVERecord?id=CVE-2026-87821)
- [CWE-918](https://cwe.mitre.org/data/definitions/918.html)
- Upatch source: [upatches/cve-2026-87821](https://github.com/copper-helm/upatch-registry/tree/main/upatches/cve-2026-87821)

### More references from NVD (10)

- [github.com](https://github.com/laradashboard/laradashboard)
- [github.com](https://github.com/laradashboard/laradashboard/blob/v0.9.2/app/Services/Builder/MarkdownFetchService.php)
- [github.com](https://github.com/laradashboard/laradashboard/blob/v1.3.1/app/Http/Controllers/Api/Builder/MarkdownController.php)
- [github.com](https://github.com/laradashboard/laradashboard/blob/v1.3.1/app/Services/Builder/MarkdownFetchService.php)
- [github.com](https://github.com/laradashboard/laradashboard/blob/v1.3.2/app/Support/Security/SafeUrlValidator.php)
- [github.com](https://github.com/laradashboard/laradashboard/commit/738cc1a219ce459323ef1d09c3789075f1b8d2f2)
- [github.com](https://github.com/laradashboard/laradashboard/releases/tag/v1.3.2)
- [github.com](https://github.com/laradashboard/laradashboard/security/advisories/GHSA-4xqv-4c27-6c4j)
- [github.com](https://github.com/laradashboard/laradashboard/security/advisories/GHSA-f36j-h77g-6wj8)
- [vulncheck.com](https://www.vulncheck.com/advisories/lara-dashboard-0.9.2-through-1.3.1-server-side-request-forgery-in-builder-markdown-fetch)
