Description
Lektor before 3.3.11 does not sanitize DB path traversal. Thus, shell commands might be executed via a file that is added to the templates directory, if the victim's web browser accesses an untrusted website that uses JavaScript to send requests to localhost port 5000, and the web browser is running on the same machine as the "lektor server" command.
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 25.10 | lektor | No fix yet | — |
| Ubuntu 24.04 LTS | lektor | No fix yet | — |
| Ubuntu 22.04 LTS | lektor | No fix yet | — |
| Ubuntu 20.04 LTS | lektor | No fix yet | — |
Affected packages
| Ecosystem | Package | Affected | Fixed | Record |
|---|---|---|---|---|
| PyPI | lektor | < 3.3.11 | 3.3.11 | GHSA-wv28-7fpw-fj49 |
| PyPI | lektor | >= 3.4.0b1, < 3.4.0b11 | 3.4.0b11 | GHSA-wv28-7fpw-fj49 |
References
- https://github.com/lektor/lektor/pull/1179/commits/8f38b9713d152622b69ff5e3b1e6a0d7bb7fa800
- https://github.com/lektor/lektor/releases/tag/v3.3.11
- https://cxsecurity.com/issue/WLB-2024030043
- https://packetstormsecurity.com/files/177708/Lektor-Static-CMS-3.3.10-Arbitrary-File-Upload-Remote-Code-Execution.html
- https://getlektor.com/docs/quickstart
- https://brave.com/privacy-updates/27-localhost-permission/