CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



CVE-2026-48708

CVE-2026-48708: Concurrent Template Parsing Race Condition in OliveTin leading to Cross-Request Command Contamination

Amit Schendel
Amit Schendel
Senior Security Researcher

Jun 24, 2026·6 min read·20 visits

Executive Summary (TL;DR)

A concurrent template parsing race condition in OliveTin allows authenticated users to crash the daemon or cause cross-request command contamination, potentially executing unauthorized commands.

CVE-2026-48708 details a critical concurrency synchronization flaw in OliveTin versions < 3000.13.0. A shared package-level text/template.Template instance is accessed concurrently across multiple goroutines without proper synchronization. When concurrent request processing occurs, a race condition causes Go runtime panics or command contamination across separate sessions, enabling denial of service or execution of contaminated commands.

Vulnerability Overview

OliveTin is a web application designed to expose predefined shell commands through a clean web user interface. It serves as a control plane for administrators to invoke scripts and command-line tools remotely. In standard deployments, the application handles incoming HTTP and gRPC request traffic, processes parameter inputs, and dynamically evaluates execution strings before passing them to the system shell.

This architecture creates a specific attack surface centered on the parsing and rendering of command templates. OliveTin versions prior to 3000.13.0 contain a race condition vulnerability in this parsing pipeline. The flaw resides within the template packaging utility where a single, package-level template instance is shared globally across goroutines.

Because multiple execution requests run concurrently in independent threads, they attempt to modify the shared template state simultaneously. This leads to unsynchronized memory access, causing the application to crash or swap execution templates between independent user sessions. Consequently, the flaw presents immediate risks of denial of service and privilege escalation.

Root Cause Analysis

The root cause of CVE-2026-48708 lies in the concurrent access of a shared text/template.Template pointer without a synchronization primitive such as a mutex. The bug is classified under CWE-362 (Race Condition) and CWE-567 (Unsynchronized Access to Shared Data in a Multithreaded Context). When the OliveTin API receives concurrent command execution requests, the Go HTTP/gRPC runtime handles each request in a separate, concurrent goroutine.

Inside the execution handler, the helper function parseTemplate is invoked to evaluate dynamic values within the shell command template. Although Go's text/template library is explicitly safe for concurrent execution (such as calling .Execute() concurrently), it is strictly unsafe for concurrent template parsing (calling .Parse()). The .Parse() method modifies the internal state of the template structure, modifying the AST and updating maps containing template definitions.

When concurrent goroutines invoke parseTemplate simultaneously, they attempt to call .Parse() on the exact same global template instance. This results in overlapping memory write operations on shared maps and pointers. Depending on the exact timing of the execution threads, the Go runtime either panics immediately upon detecting concurrent map writes or overwrites the command template AST of one thread with the content of another.

Code Analysis

In vulnerable versions of OliveTin, the service/internal/tpl/templates.go file initializes a global template variable tpl during package startup. This shared pointer contains configured functions and options intended to remain static. However, the parseTemplate function modifies this global variable directly on every request:

// Vulnerable global template pointer
var tpl = template.New("tpl").
	Option("missingkey=error").
	Funcs(template.FuncMap{"Json": jsonFunc})
 
func parseTemplate(source string, data any) (string, error) {
	// Direct mutation of the shared global pointer
	t, err := tpl.Parse(source)
	if err != nil {
		return "", err
	}
	// Execution logic follows on the mutated instance
}

To fix the concurrency bug, commit d74da9314005954dd49fa20dabf272247bc76519 introduced a cloning step. Before parsing the user-provided template source, the global template configuration is deep-copied using the .Clone() method. This ensures that the parsing operations are conducted on a thread-local instance isolated from other goroutines:

// Patched execution pipeline
func parseTemplate(source string, data any) (string, error) {
	// Thread-safe duplication of the base template configuration
	clone, err := tpl.Clone()
	if err != nil {
		return "", err
	}
 
	// Parsing is isolated to the clone within the current goroutine
	t, err := clone.Parse(source)
	if err != nil {
		return "", err
	}
	// Execution proceeds safely using the isolated clone
}

This structural change addresses the root weakness completely. Because the package-level tpl pointer is treated as read-only and never directly subjected to .Parse() calls, concurrent request handlers no longer write to shared memory fields. Each goroutine operates within its own local stack scope.

Exploitation and Attack Vectors

Exploitation of CVE-2026-48708 requires a valid authenticated session capable of invoking execution templates. The attacker must target the narrow timing window during which OliveTin parses and executes templates. To achieve this, the attacker sends concurrent API payloads designed to collide in the backend's request-handling pipeline.

An attacker can utilize a multi-threaded execution script to send rapid, overlapping HTTP POST requests to the /ExecRequest endpoint. One thread executes a low-privilege command allowed for the attacker's account. Simultaneously, another thread triggers a different command or relies on an administrative user running a high-privilege sequence at the same moment.

When the race condition is met, the global AST structure is mutated between the parsing and execution stages of the target thread. This causes the execution context of one user to run the parsed template generated by the other. The resulting security bypass allows low-privilege users to execute commands designed for administrative contexts, leading to unauthorized host access.

Impact Assessment

The vulnerability is rated with a CVSS v3.1 score of 7.5 (High), reflecting substantial exposure in multi-user OliveTin environments. The vulnerability vector CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H highlights that while attack complexity is elevated by the synchronization requirement, low-privilege network access is sufficient to initiate exploitation.

The immediate operational impact includes system-wide denial of service. The Go runtime implements built-in race detection that panics upon recognizing concurrent map writes. Consequently, any high-volume concurrent traffic on the template-rendering endpoint crashes the OliveTin application process instantly.

The secondary impact is privilege escalation and confidential data exposure. If the AST state is swapped, an attacker can hijack command structures and run arbitrary shell tasks under the privilege context of the OliveTin server daemon. Given that OliveTin frequently executes commands as a high-privilege system user, this can result in full host compromise.

Remediation and Mitigation Guidance

The recommended remediation is upgrading the OliveTin installation directly to version 3000.13.0 or later. This version incorporates the necessary code isolation by calling .Clone() on the shared template pointer prior to parsing. All containerized deployments should pull the updated image tags, and bare-metal environments should rebuild or replace the daemon binary.

If an immediate upgrade is not feasible, administrators can deploy defensive reverse-proxy configurations. Restricting concurrent request volumes to the /api/ and /ExecRequest endpoints to a maximum limit of one prevents concurrent goroutines from reaching the vulnerable code path. For example, in Nginx, Caddy, or HAProxy, rate-limiting and connection-limiting directives can be applied to isolate request execution sequentially.

Furthermore, logging facilities should be monitored for Go panic traces. Administrators should look for trace logs containing concurrent map writes associated with the service/internal/tpl.parseTemplate package path. Detecting these trace patterns confirms that either active exploitation or high-concurrency race events are occurring on the system.

Official Patches

OliveTinFix concurrent map write panics and AST mutation race condition in templates.
OliveTinGitHub Security Advisory GHSA-7fq5-7wr8-rjwj

Fix Analysis (1)

Technical Appendix

CVSS Score
7.5/ 10
CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
EPSS Probability
0.35%
Top 73% most exploited

Affected Systems

OliveTin versions prior to 3000.13.0

Affected Versions Detail

Product
Affected Versions
Fixed Version
OliveTin
OliveTin
< 3000.13.03000.13.0
AttributeDetail
CWE IDCWE-362
Attack VectorNetwork (AV:N)
CVSS v3.1 Score7.5 (High)
EPSS Score0.00349 (0.349%)
Exploit StatusNone / Theoretical
CISA KEV StatusNot Listed
Primary ImpactDenial of Service / Command Contamination

MITRE ATT&CK Mapping

T1068Exploitation for Privilege Escalation
Privilege Escalation
CWE-362
Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition')

The program flow permits concurrent threads to write to the same template object simultaneously, resulting in unstable states.

Vulnerability Timeline

Vulnerability fixed in source repository
2026-05-21
OliveTin version 3000.13.0 released
2026-06-15
GitHub Security Advisory published and CVE-2026-48708 assigned
2026-06-15
National Vulnerability Database analysis completed
2026-06-24

References & Sources

  • [1]GitHub Security Advisory GHSA-7fq5-7wr8-rjwj
  • [2]OliveTin Remediation Commit
  • [3]OliveTin Release 3000.13.0
  • [4]CVE.org Official Record

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.

More Reports

•2 days ago•CVE-2026-54068
5.9

CVE-2026-54068: Unauthenticated Server-Side Template Injection and SQLite Exfiltration in SiYuan PKM

An authentication bypass in the SiYuan personal knowledge management system before version 3.7.0 exposes a dynamic icon rendering endpoint. This endpoint processes client-supplied Go template directives. By submitting a crafted request, an unauthenticated remote attacker can leverage registered database template functions to execute arbitrary read-only SQL queries and exfiltrate workspace contents.

Amit Schendel
Amit Schendel
14 views•5 min read
•2 days ago•CVE-2026-54069
9.1

CVE-2026-54069: Authentication Bypass in SiYuan Note via Origin Header Spoofing

CVE-2026-54069 is a critical authentication bypass vulnerability in the SiYuan Note personal knowledge management system. The flaw is located in the HTTP server's middleware handling API authorization, which unconditionally trusts requests carrying a 'chrome-extension://' scheme in the Origin HTTP header, granting administrative access without validating API tokens.

Alon Barad
Alon Barad
12 views•5 min read
•2 days ago•CVE-2026-54089
9.1

CVE-2026-54089: Authentication Bypass by Spoofing in File Browser

CVE-2026-54089 is a critical authentication bypass vulnerability in File Browser affecting instances configured with proxy-based authentication. An unauthenticated remote attacker with direct network access can impersonate arbitrary users or register new accounts by spoofing configured HTTP headers.

Amit Schendel
Amit Schendel
11 views•7 min read
•2 days ago•GHSA-99J7-FHR2-XFJ4
10.0

GHSA-99J7-FHR2-XFJ4: Malicious Remote Code Execution Payload in 'exploration' Cargo Crate

The malicious Cargo package 'exploration' was uploaded to the crates.io registry. During compilation or package import, the crate executes code designed to establish an outbound TCP/HTTP connection, download an external second-stage binary, and execute the binary locally on the host machine. This creates an unauthenticated remote code execution vector impacting developer environments and continuous integration pipelines.

Amit Schendel
Amit Schendel
13 views•6 min read
•2 days ago•CVE-2026-54088
9.3

CVE-2026-54088: Pre-Authentication Remote Code Execution in File Browser Hook Authentication

CVE-2026-54088 is a critical command injection vulnerability in File Browser prior to version 2.63.6. When Hook Authentication is enabled, the application interpolates unsanitized credentials into a shell command, allowing unauthenticated remote code execution.

Alon Barad
Alon Barad
13 views•6 min read
•2 days ago•GHSA-QV4M-M73M-8HJ7
8.8

GHSA-qv4m-m73m-8hj7: Authenticated Arbitrary File Upload leading to Remote Code Execution in NotrinosERP

An authenticated remote code execution vulnerability exists in NotrinosERP (versions up to and including 1.0.0) within the Human Resource Management (HRM) module. Users with employee management permissions can upload arbitrary file types, including PHP scripts, which are written directly to a web-accessible directory. This allows for arbitrary code execution in the context of the web-server user.

Alon Barad
Alon Barad
8 views•6 min read