Description
Algernon is a small self-contained pure-Go web server. Prior to 1.17.6, in engine/luahandler.go, the sync.RWMutex protecting LoadCommonFunctions is released before L.Push() and L.PCall() execute. Since gopher-lua's LState is explicitly not goroutine-safe, concurrent requests race on the shared state causing Lua VM corruption. The Go race detector confirms this immediately under modest concurrency (ab -n 1000 -c 100). This vulnerability is fixed in 1.17.6.
Published: 2026-05-26
Score: 8.2 High
EPSS: n/a
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

A race condition exists in the Algernon web server where the sync.RWMutex protecting the LoadCommonFunctions is released before the L.Push() and L.PCall() operations on a gopher‑lua LState. Because the LState is not goroutine‑safe, concurrent requests can access it simultaneously, leading to corruption of the Lua virtual machine. This flaw is a classic concurrency bug (CWE‑362) that can cause application crashes or potentially allow malicious actors to corrupt execution flow. The impact is primarily a disruption of service, although in a loosely specified environment it could extend to more severe failures if arbitrary Lua code can be executed.

Affected Systems

The affected product is the Algernon web server (xyproto:algernon) in all versions prior to 1.17.6. Any deployment running these versions may experience the race condition when handling concurrent HTTP requests that invoke Lua handlers.

Risk and Exploitability

The CVSS score of 8.2 classifies this vulnerability as high severity. EPSS data is not available, and the entry is not listed in the CISA KEV catalog, though the issue is known to a public security advisory. The likely attack vector is through normal or malicious concurrent traffic to the web server’s Lua‑enabled endpoints; attackers could trigger the race by sending multiple requests from different clients. Failures typically manifest as service crashes or corrupted Lua VM state, and the exploitation conditions are realistic in high‑traffic or poorly throttled environments. The combination of high severity and readily available attack surface results in a significant risk that warrants prompt mitigation.

Generated by OpenCVE AI on May 26, 2026 at 18:24 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Update the Algernon server to version 1.17.6 or later, which contains the mutex fix.
  • If an upgrade is not immediately feasible, reduce the concurrency of Lua handler requests through request throttling or load‑balancer limits to prevent simultaneous access to the shared LState.
  • If Lua scripting is not essential for your deployment, disable Lua support in the server configuration to eliminate the shared state usage entirely.

Generated by OpenCVE AI on May 26, 2026 at 18:24 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Tue, 26 May 2026 17:00:00 +0000

Type Values Removed Values Added
Description Algernon is a small self-contained pure-Go web server. Prior to 1.17.6, in engine/luahandler.go, the sync.RWMutex protecting LoadCommonFunctions is released before L.Push() and L.PCall() execute. Since gopher-lua's LState is explicitly not goroutine-safe, concurrent requests race on the shared state causing Lua VM corruption. The Go race detector confirms this immediately under modest concurrency (ab -n 1000 -c 100). This vulnerability is fixed in 1.17.6.
Title Algernon: Race Condition in handle() shared LState
Weaknesses CWE-362
References
Metrics cvssV4_0

{'score': 8.2, 'vector': 'CVSS:4.0/AV:N/AC:H/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N'}


Subscriptions

No data.

cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-05-26T16:31:55.696Z

Reserved: 2026-05-04T20:24:31.916Z

Link: CVE-2026-43981

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Received

Published: 2026-05-26T17:16:45.950

Modified: 2026-05-26T17:16:45.950

Link: CVE-2026-43981

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-05-26T18:30:12Z

Weaknesses