mirror of
https://github.com/dutchcoders/transfer.sh.git
synced 2026-02-03 06:03:25 +00:00
[Security] Critical CVE found in dutchcoders/transfer.sh:latest #2
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @felipewnp on GitHub.
Summary
A security scan of the
dutchcoders/transfer.shDocker image reveals one critical vulnerability in a bundled Go dependency: CVE-2024-45337 ingolang.org/x/crypto/ssh.A logic flaw in how
ServerConfig.PublicKeyCallbackis used can lead to SSH authorization bypass, allowing clients with unintended or unauthorized public keys to be accepted if the application misuses this callback.Details
dutchcoders/transfer.shgolang.org/x/crypto/sshCVE-2024-45337v0.21.0v0.31.0golang.org/x/crypto/ssh: Misuse of ServerConfig.PublicKeyCallback may cause authorization bypass in golang.org/x/cryptoTechnical description
The vulnerability resides in the SSH server implementation in
golang.org/x/crypto/ssh:ssh.ServerConfig.PublicKeyCallbackmay incorrectly handle SSH public-key authentication when relying on this callback, due to the API’s semantics and how the library invokes it.transfer.sh(or any service in the image) exposes an SSH interface for uploads/downloads or administrative access, andServerConfig.PublicKeyCallback.Even if the main
transfer.shservice primarily uses HTTPS/HTTP, any embedded or sidecar SSH functionality built with this library version is subject to this issue.PoC
Below is a practical way to reproduce and confirm the vulnerability’s presence in the image at the dependency level.
1. Reproduce via image scan (Trivy)
Prerequisite: Trivy installed (or use the Trivy Docker image).
Run:
Expected output (simplified):
Library: golang.org/x/cryptoVulnerability: CVE-2024-45337Installed Version: v0.21.0Fixed Version: 0.31.0This confirms that the image is built against the vulnerable
golang.org/x/cryptoversion.2. (Optional, for maintainers) Locate vulnerable usage in code
If you maintain or fork
transfer.sh:Look specifically for patterns like:
Review:
Impact
What kind of vulnerability is it?
ServerConfig.PublicKeyCallbackis misused, due to library behavior.Who is impacted?
dutchcoders/transfer.shthat:golang.org/x/crypto v0.21.0, andServerConfig.PublicKeyCallbackfor public-key-based authorization (e.g., SSH-based upload, admin, or maintenance endpoints).Practical risk:
Authorization bypass via SSH public-key auth:
If
transfer.shis deployed without any SSH-based interface, or if SSH is fronted by another component (e.g., a bastion that does not use Go’sx/crypto/ssh), practical impact may be low—but the underlying library is still vulnerable and should be updated.@paolafrancesca commented on GitHub:
thanks, @JustAnotherArchivist :)
@JustAnotherArchivist commented on GitHub:
This is LLM-generated noise. transfer.sh does not use SSH.