Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…
EPSS 0.3%top 76%

CVE-2026-40188: CWE-1314: Missing Write Protection for Parametric Data Values in patrickhener goshs

0
High
VulnerabilityCVE-2026-40188cvecve-2026-40188cwe-1314
Published: 04/10/2026 (04/10/2026, 19:43:45 UTC)
Source: CVE Database V5
Vendor/Project: patrickhener
Product: goshs

Description

goshs is a SimpleHTTPServer written in Go. From 1.0.7 to before 2.0.0-beta.4, the SFTP command rename sanitizes only the source path and not the destination, so it is possible to write outside of the root directory of the SFTP. This vulnerability is fixed in 2.0.0-beta.4.

CVSS v3.1

Score 7.7high

Attack Vector
Network
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
Changed
Confidentiality
None
Integrity
High
Availability
None
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:N/I:H/A:N

Affected software

github.com/patrickhener/goshs
pkg:golang/github.com/patrickhener/goshs

Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 04/18/2026, 14:36:42 UTC

Technical Analysis

The vulnerability CVE-2026-40188 in patrickhener's goshs (versions >=1.0.7 and <2.0.0-beta.4) is due to insufficient sanitization of the destination path in the SFTP rename command. While the source path is sanitized, the destination path is not, enabling an attacker with privileges to rename files to locations outside the SFTP root directory. This can result in unauthorized file writes and potential integrity violations. The flaw is categorized under CWE-1314 (Missing Write Protection for Parametric Data Values). The issue is resolved in version 2.0.0-beta.4.

Potential Impact

An attacker with privileges to use the SFTP rename command can write files outside the designated root directory, potentially overwriting or creating files in unauthorized locations. This compromises file integrity but does not directly impact confidentiality or availability according to the CVSS vector. The vulnerability requires privileges and has a low attack complexity, making it a significant risk in environments where users have SFTP access.

Mitigation Recommendations

Upgrade goshs to version 2.0.0-beta.4 or later, where the vulnerability is fixed. Since no official patch link or advisory is provided, users should verify the version in use and apply the update accordingly. Patch status is not explicitly confirmed beyond the version fix indication; therefore, check the vendor repository or official sources for the latest remediation guidance.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Data Version
5.2
Assigner Short Name
GitHub_M
Date Reserved
2026-04-09T20:59:17.620Z
Cvss Version
3.1
State
PUBLISHED
Remediation Level
null

Threat ID: 69d9581c1cc7ad14dae48c7b

Added to database: 04/10/2026, 20:05:48 UTC

Last enriched: 04/18/2026, 14:36:42 UTC

Last updated: 07/31/2026, 19:22:58 UTC

Views: 147

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses