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·25 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

•12 minutes ago•CVE-2026-15895
8.4

CVE-2026-15895: OS Command Injection in AWS jsii-diff CLI

An OS command injection vulnerability exists in the npm package loading component of the jsii-diff CLI tool within the AWS jsii framework. Prior to version 1.131.0, when parsing package specifiers prefixed with `npm:`, the tool concatenated user-controlled inputs directly into a shell execution string via child_process.exec. This allows attackers to execute arbitrary shell commands under the context of the running Node.js process.

Amit Schendel
Amit Schendel
0 views•7 min read
•about 1 hour ago•CVE-2026-63220
4.8

CVE-2026-63220: Trust of Untrusted Reverse Proxy Headers in CodeIgniter4

CodeIgniter4 versions prior to v4.7.4 contain a protocol-spoofing vulnerability due to improper verification of upstream reverse proxy forwarding headers. Remote, unauthenticated attackers can inject headers like X-Forwarded-Proto to deceive the framework into identifying an insecure HTTP request as a secure HTTPS connection.

Alon Barad
Alon Barad
2 views•7 min read
•about 2 hours ago•CVE-2026-63221
9.4

CVE-2026-63221: SQL Injection in CodeIgniter4 Query Builder deleteBatch()

An SQL injection vulnerability exists in the Query Builder component of the CodeIgniter4 full-stack PHP framework. The vulnerability is located within the compilation logic of the batch delete operation, deleteBatch(). When an application chains where() conditions prior to calling deleteBatch(), the Query Builder fails to enforce or respect the escaping flags of the parameters bound to the WHERE clauses. Instead of passing these parameters through the database driver standard escaping logic, the compilation engine interpolates the raw, unescaped bound values directly into the compiled SQL string, allowing remote attackers to execute arbitrary SQL commands.

Amit Schendel
Amit Schendel
3 views•8 min read
•about 3 hours ago•CVE-2026-63222
7.5

CVE-2026-63222: Remote Code Execution via Path Traversal in CodeIgniter4 File Upload Handler

CVE-2026-63222 details a high-severity path traversal vulnerability in CodeIgniter4 versions prior to 4.7.4. The flaw lies within the `UploadedFile::move()` handler, which falls back to unsanitized, client-provided file names from the HTTP multipart request when a target name is not explicitly passed. An unauthenticated remote attacker can exploit this flaw to traverse arbitrary server directories, write malicious PHP payloads to the public-facing web root, and execute arbitrary code on the target system.

Amit Schendel
Amit Schendel
4 views•6 min read
•about 4 hours ago•CVE-2026-63223
9.8

CVE-2026-63223: Unrestricted File Upload leading to Remote Code Execution in CodeIgniter4

A critical unrestricted file upload vulnerability (CWE-434) in CodeIgniter4 allows unauthenticated remote attackers to execute arbitrary code. By bypassing weak validation filters in the `is_image` and `mime_in` rules, an attacker can upload a malicious PHP payload disguised as a valid image file.

Amit Schendel
Amit Schendel
3 views•6 min read
•about 5 hours ago•CVE-2026-67422
7.5

CVE-2026-67422: Regular Expression Denial of Service in pymdown-extensions

A high-severity Regular Expression Denial of Service (ReDoS) vulnerability in pymdown-extensions versions prior to 11.0.1 affects the Caret, Tilde, BetterEm, and MagicLink inline processors. When parsing user-supplied Markdown content containing malicious sequences of formatting delimiters, the regular expression engine is forced into catastrophic backtracking, resulting in CPU exhaustion and application denial of service.

Alon Barad
Alon Barad
3 views•5 min read