Skip to content

Instantly share code, notes, and snippets.

@alon710
Created February 13, 2026 14:40
Show Gist options
  • Select an option

  • Save alon710/b5d6a408cb49a2cc93848adf07f18fe7 to your computer and use it in GitHub Desktop.

Select an option

Save alon710/b5d6a408cb49a2cc93848adf07f18fe7 to your computer and use it in GitHub Desktop.
CVE-2025-56647: Harvesting Your Code: The Farm Dev Server CSWSH Exploit - CVE Security Report

CVE-2025-56647: Harvesting Your Code: The Farm Dev Server CSWSH Exploit

CVSS Score: 6.5 Published: 2026-02-12 Full Report: https://cvereports.com/reports/CVE-2025-56647

Summary

A critical flaw in the @farmfe/core build tool allows remote attackers to siphon source code directly from a developer's machine via Cross-Site WebSocket Hijacking (CSWSH). By failing to validate the Origin header during Hot Module Replacement (HMR) negotiation, Farm permits any website visited by a developer to connect to their local dev server and listen for code updates.

TL;DR

The Farm build tool (versions < 1.7.6) leaves its HMR WebSocket wide open. If a developer visits a malicious site while their dev server is running, the site can connect to localhost, hijack the WebSocket, and steal source code in real-time as the developer saves files.

Exploit Status: POC

Technical Details

  • CWE ID: CWE-1385 (Missing Origin Validation in WebSockets)
  • Attack Vector: Network (via Browser CSWSH)
  • CVSS: 6.5 (Medium)
  • EPSS Score: 0.00015
  • Impact: Confidentiality (High)
  • Exploit Status: PoC Available

Affected Systems

  • @farmfe/core npm package
  • @farmfe/core: < 1.7.6 (Fixed in: 1.7.6)

Mitigation

  • Upgrade to @farmfe/core v1.7.6+
  • Isolate development environments in containers
  • Implement strict Origin validation in all WebSocket servers

Remediation Steps:

  1. Check the installed version of @farmfe/core using npm list @farmfe/core.
  2. If the version is below 1.7.6, update immediately via npm update @farmfe/core.
  3. Verify the fix by inspecting network traffic during HMR; ensure connections with arbitrary Origins are rejected.

References


Generated by CVEReports - Automated Vulnerability Intelligence

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment