Aug 18, 2026·7 min read·44 visits
Copyparty is vulnerable to a privilege escalation vulnerability where a valid file key can be elevated to a directory key, allowing unauthorized directory listings and access to adjacent files when directory-key (dk) and file-key (fk) flags are enabled simultaneously.
A logical authorization bypass vulnerability in copyparty allows an attacker possessing a restricted file-level key to escalate privileges to directory-level access, exposing directory listings and adjacent files.
Copyparty is a portable file server environment offering web-based directory exploration, uploading, and administration. It relies on a modular volume structure where administrators can configure access permissions using fine-grained flags. Among these flags are directory keys (dk or dks) and file keys (fk or fka), which control localized access for untrusted clients. The directory keys grant listing and read permissions for directory hierarchies, whereas file keys restrict client access exclusively to a single designated file.
The attack surface is localized within the web-browser engine component of the file server, specifically handled in the tx_browser handler inside copyparty/httpcli.py. This handler serves as the entry point for formatting directory trees, managing download listings, and handling browser requests. When directory keying and file keying are mixed on a single storage volume, the logical access boundary collapses.
This issue is categorized under CWE-863 (Incorrect Authorization). It permits an authenticated user with low privileges (possession of a single valid file key) to step outside their authorized scope and list directory tree nodes. This logical flaw bypasses the granular boundary that developers implemented to isolate single-file assets from neighboring resources in the same path.
The logical collapse is caused by state tracking confusion when processing the connection context in copyparty/httpcli.py. The HTTP daemon establishes a boolean tracker named use_filekey to identify whether a given connection has authenticated strictly via a file-level key. If use_filekey is active, the request lifecycle should restrict execution endpoints from executing directory-level listings or returning indexes of container folders.
When the server handles a directory-rendering routine, it queries the volume flags to populate configuration attributes for the current workspace. In vulnerable versions, the initialization of the add_dk variable—responsible for checking if directory keys should be processed—was performed via add_dk = vf.get("dk"). This assignment solely checked if the configuration flag was enabled for the storage volume, completely ignoring whether the current session's key validation context was limited to a file key.
Because the server verified that the user presented a valid cryptographic or token key (the file key itself), the key checking loop completed successfully. However, when rendering the directory interface, the unconditional initialization of the directory-key mechanisms (add_dk = True) allowed the server to treat the file key as a valid credential for directory operations. This logical promotion enabled a client to request index trees because the backend failed to isolate the scope of the active file key.
A direct analysis of the patch highlights the exact mechanical failure of the authorization check. The critical vulnerability window existed inside the HTTP client request handler when preparing volume attributes for display.
# Vulnerable implementation in copyparty/httpcli.py prior to v1.20.17
# The software loaded the directory key flag directly from the volume structure (vf)
# without verifying if the active user was restricted by a file key constraint.
add_dk = vf.get("dk")This evaluation meant that if the volume configuration possessed directory keys (dk), the backend enabled directory-key logic for the request. The patch corrected this issue by enforcing a logical conjunction that requires the request not to be a restricted file key session.
# Patched implementation in copyparty/httpcli.py inside commit e40755331ba9449993ff482456e6bdd2c6deb950
# The fix couples the directory key activation flag to the negation of the file key restriction variable.
add_dk = not use_filekey and vf.get("dk")This addition ensures that if use_filekey is True (meaning the client has authenticated with an fk or fka key), add_dk is forced to False regardless of whether directory keying (dk or dks) is enabled on the storage volume. This fix is complete; it directly blocks the initialization of the directory index routine for any thread constrained by a file-level token.
Exploitation of CVE-2026-70657 requires no specialized tools and can be executed via basic HTTP clients. The primary requirement is that the target copyparty volume is configured to use both file keys and directory keys. Additionally, the attacker must have obtained a valid file key string, which might be distributed to low-privilege users or guests for accessing specific media assets or logs.
The attack sequence begins with a standard request to download or view the authorized file. This request validates the key and sets the server's session state. The attacker then modifies the request path to point to the containing directory instead of the specific file, whilst retaining the exact same file-key query parameter.
In a vulnerable version, the directory browser processes this request. Instead of returning an access control error, it evaluates the volume-level flags, sees that dk is active, and matches the authenticated credentials. The server lists all files, directories, and metadata residing in the folder, granting full visibility to neighboring resources.
The impact of this vulnerability is a breach of confidentiality on affected copyparty storage volumes. In multi-tenant or multi-user file storage setups where file keys are distributed to isolate different files (such as database backups, user documents, or proprietary logs), a low-privileged client can view and download all adjacent assets. This circumvents the access controls that administrators rely on to secure multitenant file systems.
The CVSS v3.1 base score of 4.3 reflects this localized, medium-severity risk. Since write permissions or code execution capabilities are not granted through this specific logic flaw, Integrity and Availability scores remain at zero. However, in environments hosting highly sensitive data, this can lead to data exposure and lateral discovery.
Because the vulnerability requires an explicit, non-default configuration (mixing dk and fk on the same volume), the overall threat landscape is specialized. This explains its current status on CISA's KEV catalog (not listed) and its low EPSS score. However, for organizations that rely on Copyparty for public-facing assets, the exploit complexity remains low once a key is acquired.
Remediation requires upgrading the Copyparty software to version 1.20.17 or higher. The patch strictly separates the validation scopes of file keys and directory keys, preventing the logical promotion of restricted credentials. Upgrading can be completed by downloading the updated package from the official repository or pulling the latest container image.
If immediate patching is impossible, defensive engineers should audit copyparty configurations. Review the volume flags to ensure that dk/dks and fk/fka are never combined on the same virtual root or storage directory. Segregating resources into separate volumes based on access key types will nullify the vulnerable code path.
Additionally, network-level monitoring or web application firewalls can be configured to inspect query parameters. If a request targets a directory index while presenting parameters historically associated with file-level authentication, it should be dropped. ModSecurity and other modern engines can enforce rules to detect and alert on anomalous traversal requests targeting Copyparty directories.
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N| Product | Affected Versions | Fixed Version |
|---|---|---|
copyparty 9001 | < 1.20.17 | 1.20.17 |
| Attribute | Detail |
|---|---|
| CWE ID | CWE-863 |
| Attack Vector | Network |
| CVSS Score | 4.3 (Medium) |
| Exploit Status | PoC |
| KEV Status | Not Listed |
| Affected Function | tx_browser in copyparty/httpcli.py |
The software performs an authorization check when an actor attempts to access a resource or perform an action, but it does not correctly prove that the actor is authorized to perform that action or access that resource.
CVE-2026-126303 (GHSA-8fx7-8jr8-84rv) is an uncontrolled resource consumption vulnerability in the Natural Language Toolkit (NLTK) prior to version 3.10.4. The flaw is located in the SteppingRecursiveDescentParser.parse() method within the nltk.parse.recursivedescent module. Because the parser executes a top-down recursive descent stepping loop without enforcing an execution time deadline or step limit, processing tokens against a left-recursive, self-embedding, or ambiguous Context-Free Grammar (CFG) causes the parser to enter an infinite loop. This results in complete CPU core exhaustion and worker thread starvation, leading to an application-level denial of service.
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.
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.
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).
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.
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.