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-86540

CVE-2026-86540: Arbitrary Code Execution via LSP Binary Override in knowns

Amit Schendel
Amit Schendel
Senior Security Researcher

Oct 6, 2026·5 min read·12 visits

Executive Summary (TL;DR)

Unvalidated binary paths in workspace configuration files allow arbitrary command execution when opening a repository in knowns.

CVE-2026-86540 is a high-severity arbitrary code execution vulnerability in knowns, a repository management tool. The vulnerability occurs when the application parses and executes unvalidated language server binary overrides defined within a project's local configuration file.

Vulnerability Overview

The vulnerability CVE-2026-86540 describes an arbitrary code execution vulnerability in knowns, a developer tool and repository management application. The issue is located within the workspace configuration processing component, which handles project-level settings when a workspace directory is opened.\n\nIn vulnerable versions of the application, opening a directory containing a crafted .knowns/config.json configuration file allows the application to automatically parse and load settings without verification. The vulnerability is triggered during workspace startup, when the application attempts to initialize the Language Server Protocol (LSP) environment using paths specified in the configuration file.\n\nBecause the workspace initialization occurs automatically upon opening the directory, the application requires minimal user interaction to trigger the vulnerability beyond opening the workspace. This behavior exposes a significant attack surface to untrusted repositories, such as open-source projects or shared codebases.

Root Cause Analysis

The root cause of CVE-2026-86540 is a failure to sanitize and validate input in the settings.lsp.languages.<lang>.binary configuration property, which is mapped to the CWE-78 weakness class (Improper Neutralization of Special Elements used in an OS Command).\n\nWhen knowns initializes, the internal/lsp/detect.go component resolves the configured binary path via Detector.resolve. The resolution logic reads the user-supplied string from the local project configuration and instantiates a Binary object directly using this parameter without validation.\n\nBecause there is no verification that the user-supplied string matches a safe or pre-registered executable binary name, the application passes this unvalidated string to execution subshells. The execution is performed twice during the application workflow: first during workspace detection routines using functions like exec.LookPath, and second when starting the language server daemon via StartLanguage in internal/lsp/manager.go. Consequently, any system command or path to a local executable specified in the configuration file is executed with the privileges of the running application process.

Technical Diagram & Flow

The following diagram illustrates the technical execution flow from loading the malicious configuration to process execution under the user's privilege context.\n\nmermaid\ngraph LR\n A["Malicious Directory Opened"] --> B["Parse .knowns/config.json"]\n B --> C["Extract settings.lsp.languages.go.binary"]\n C --> D["Instantiate Binary with raw string"]\n D --> E["Detector.resolve checks binary"]\n E --> F["System executes payload via exec.LookPath / StartLanguage"]\n

Source Code Analysis

The vulnerability exists in the way internal/lsp/detect.go resolves overrides. In vulnerable versions, the application takes the raw string directly from the config file and creates a Binary structure.\n\nBelow is the vulnerable code block from version 0.29.1:\n\ngo\n// Vulnerable Code in internal/lsp/detect.go\nfunc (d *Detector) resolve(ctx context.Context, root string, lang Language, override string) (ServerCommand, bool) {\n\tbinaries := lang.Binaries\n\tif override != "" {\n\t\tbinary := Binary{Name: override} // Raw, unvalidated override string is accepted\n\t\tif len(binaries) > 0 {\n\t\t\tbinary.CheckArgs = append([]string(nil), binaries[0].CheckArgs...)\n\t\t}\n\t\tbinaries = []Binary{binary}\n\t}\n\t// ...\n}\n\n\nThe official patch in version 0.30.0 addresses this by introducing strict whitelist verification functions within internal/lsp/binary_override.go. The validation functions verify that the override string is an exact match for one of the pre-registered binaries associated with the corresponding language adapter.\n\nBelow is the patched implementation of the verification and resolution routines:\n\ngo\n// Patched Code in internal/lsp/binary_override.go\nfunc selectBinaryOverride(override string, candidates []Binary) (Binary, error) {\n\tif strings.TrimSpace(override) != override || override == "" {\n\t\treturn Binary{}, invalidBinaryOverride(override)\n\t}\n\tfor _, candidate := range candidates {\n\t\tif candidate.Name == override {\n\t\t return candidate, nil // Returns the binary only if it matches a registered candidate\n\t\t}\n\t}\n\treturn Binary{}, invalidBinaryOverride(override)\n}\n\n// Patched Code in internal/lsp/detect.go\nfunc (d *Detector) resolve(ctx context.Context, root string, lang Language, override string) (ServerCommand, bool) {\n\tbinaries := lang.Binaries\n\tif override != "" {\n\t\tbinary, err := selectBinaryOverride(override, binaries)\n\t\tif err != nil {\n\t\t return ServerCommand{}, false // Safe rejection on invalid binary name\n\t\t}\n\t\tbinaries = []Binary{binary}\n\t}\n\t// ...\n}\n

Exploitation Methodology

An attacker exploits this vulnerability by distributing a repository containing a malicious .knowns/config.json configuration file. The target workspace configuration is set to point the LSP binary to a command interpreter or local script.\n\nTo demonstrate this concept, a workspace is configured with the following content within .knowns/config.json:\n\njson\n{\n "settings": {\n "lsp": {\n "languages": {\n "go": {\n "binary": "/bin/sh"\n }\n }\n }\n }\n}\n\n\nWhen the victim opens the repository containing this file with knowns, the workspace manager reads the configuration. During the language server initialization phase, the workspace engine attempts to run the binary identified as /bin/sh to launch the language server, leading to execution of the shell instead of the language tool. If the attacker also bundles a target execution payload, they can force execution of specific scripts by specifying path parameters.

Impact Assessment

The vulnerability poses a high risk to environments running knowns on untrusted repositories. Successful exploitation results in arbitrary command execution under the context of the user running the application.\n\nAccording to CVSS v4.0 metrics, this vulnerability has a base score of 8.5. The attack vector is local because the user must interact with and open the directory containing the malicious configuration file. There are no special execution conditions, and no administrative privileges are required to exploit the flaw.\n\nBecause the code runs within the user's active session, the attacker gains full read, write, and execute permissions over all files accessible to that user account. This can lead to credential theft, compromise of sensitive source code, and subsequent privilege escalation on the host system.

Remediation & Mitigation Guidance

The primary remediation strategy is upgrading the application to version 0.30.0 or higher. Version 0.30.0 introduces structural input validation and prevents unauthorized binary overrides by rejecting non-registered executable names.\n\nIn environments where upgrading is not immediately possible, organizations must implement operational controls. Users must refrain from opening directories or repositories from untrusted sources, such as unverified public code repositories.\n\nAdditionally, system administrators should monitor process creation logs. Security tools should flag any instances where the application processes initiate system interpreters or command shells directly upon workspace loading.

Technical Appendix

CVSS Score
8.5/ 10
CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
EPSS Probability
0.21%
Top 89% most exploited

Affected Systems

knowns

Affected Versions Detail

Product
Affected Versions
Fixed Version
knowns
knowns-dev
< 0.30.00.30.0
AttributeDetail
CWE IDCWE-78
Attack VectorLocal
CVSS v4.0 Base Score8.5
EPSS Score0.00212
Exploit Statusnone/low
ImpactArbitrary Code Execution (ACE)

MITRE ATT&CK Mapping

T1059Command and Scripting Interpreter
Execution
CWE-78
Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')

The application constructs an OS command using externally-influenced input without neutralizing or validating the input before passing it to execution subsystems.

Vulnerability Timeline

Security patch committed in d3989829fb5095666d23d005b2f78a082832a396
2026-08-13
GitHub Security Advisory GHSA-mc52-mwq4-vfx3 published
2026-09-07
Release of version 0.30.0 containing the fix
2026-09-07

References & Sources

  • [1]GitHub Security Advisory GHSA-mc52-mwq4-vfx3
  • [2]Fix Commit
  • [3]NVD Detail

More Reports

•25 minutes ago•CVE-2026-62683
3.1

CVE-2026-62683: Incorrect Authorization via Stale Public Shares in File Browser

File Browser versions prior to 2.63.17 contain an authorization and state-management flaw in the BoltDB storage backend. When an authenticated user deletes a shared directory via an HTTP request with a trailing slash (e.g., DELETE /api/resources/a/), the share cleanup routine queries the database index using the unnormalized path before stripping the trailing slash. Because canonical share paths are stored without trailing slashes (e.g., /a), the database prefix query fails to match the parent directory share record. If a directory with the same name is later recreated, the dormant public share hash automatically reactivates and exposes the new directory contents to unauthenticated users.

Alon Barad
Alon Barad
1 views•10 min read
•about 1 hour ago•CVE-2026-62297
7.5

CVE-2026-62297: Uncontrolled Memory Allocation and Denial of Service in ag-psd

An uncontrolled memory allocation vulnerability exists in ag-psd versions prior to 31.0.0. When parsing Adobe Photoshop Document (PSD) files, the readPsd() function reads image dimensions and color depth directly from the file header and allocates off-heap typed arrays without validating whether the requested memory size is proportional to the input stream or bounded by operational thresholds. An unauthenticated attacker can supply a crafted 52-byte PSD payload that triggers an immediate 3.35 GB memory allocation, resulting in process termination via the operating system Out-Of-Memory (OOM) killer.

Amit Schendel
Amit Schendel
3 views•10 min read
•about 2 hours ago•CVE-2026-126297
7.5

CVE-2026-126297: Algorithmic Complexity Denial of Service in NLTK ConllCorpusReader

CVE-2026-126297 (GHSA-v8f3-6phw-6mh9) is an uncontrolled resource consumption and algorithmic complexity vulnerability in the Natural Language Toolkit (NLTK) prior to version 3.10.4. Located in the Semantic Role Labeling (SRL) parser within `nltk/corpus/reader/conll.py`, the flaw allows an attacker to trigger quadratic O(N^2) CPU processing overhead by providing crafted CoNLL-formatted corpus inputs containing decoy span columns or nested full-width verb spans. Applications parsing untrusted linguistic corpora can experience prolonged CPU exhaustion and application-level Denial of Service (DoS).

Amit Schendel
Amit Schendel
3 views•12 min read
•about 3 hours ago•CVE-2026-126298
7.5

CVE-2026-126298: Quadratic Algorithmic Complexity Denial of Service in NLTK Tree.chomsky_normal_form

CVE-2026-126298 (also tracked as GHSA-r53h-rw34-8h97) is an algorithmic complexity Denial of Service (DoS) vulnerability in the Natural Language Toolkit (NLTK) Python library affecting all versions prior to 3.10.4. The vulnerability resides in the nltk.tree.transforms.chomsky_normal_form function and its corresponding public method Tree.chomsky_normal_form(). When transforming a parse tree into Chomsky Normal Form using the default right-factoring strategy, the function repeatedly invokes list.pop(0) inside a loop iterating over all children of a node. In CPython, removing the initial element of a standard list requires an O(N) memory shift operation, causing the overall binarization algorithm to degrade to O(N^2) quadratic time complexity relative to the width of a node. Furthermore, converting horizontal node width into vertical tree depth bypasses initial parsing depth bounds, triggering subsequent stack exhaustion (RecursionError) when recursive methods traverse the mutated structure. Unauthenticated remote attackers who can submit bracketed tree strings to applications invoking this transformation can exhaust single-threaded CPU resources or induce unhandled application exceptions.

Alon Barad
Alon Barad
6 views•12 min read
•about 4 hours ago•CVE-2026-126299
7.5

CVE-2026-126299: Quadratic Algorithmic Complexity Denial of Service in NLTK CCG Lexicon Parser

An algorithmic complexity vulnerability (CWE-407) in the Natural Language Toolkit (NLTK) before version 3.10.4 allows remote unauthenticated attackers to cause a denial of service via crafted Combinatory Categorial Grammar (CCG) lexicon strings. The parser in nltk.ccg.lexicon.fromstring performs repeated immutable string slicing, concatenation, and regex tail capturing, resulting in O(n^2) CPU consumption when processing wide, flat category definitions.

Alon Barad
Alon Barad
5 views•10 min read
•about 5 hours ago•CVE-2026-126295
7.1

CVE-2026-126295: Path Traversal and Unconfined File Access in NLTK BllipParser

CVE-2026-126295 (also tracked as GHSA-fg9w-wfp5-j933) is a path confinement bypass vulnerability in the Natural Language Toolkit (NLTK) affecting versions 3.10.0 prior to 3.10.4. The flaw resides in nltk/parse/bllip.py within the BllipParser class and its factory method BllipParser.from_unified_model_dir(). Unlike sibling tool wrappers in NLTK that enforce data-root confinement via the nltk.pathsec module, BllipParser passes caller-supplied filesystem paths directly into the third-party bllipparser native C extension without validation. When an application passes untrusted input as model paths or directories to BllipParser, an attacker can force the native extension to open arbitrary files on the local filesystem. This leads to information disclosure through parser diagnostic oracles, local model tampering via shared directories, and denial of service by hanging worker threads on blocking special files (such as FIFOs or device nodes) or exhausting memory via oversized files.

Amit Schendel
Amit Schendel
2 views•11 min read