Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x/vulndb: potential Go vuln in github.com/siruspen/logrus #3502

Open
1 task done
AnomalRoil opened this issue Mar 5, 2025 · 0 comments
Open
1 task done

x/vulndb: potential Go vuln in github.com/siruspen/logrus #3502

AnomalRoil opened this issue Mar 5, 2025 · 0 comments

Comments

@AnomalRoil
Copy link

Acknowledgement

  • The maintainer(s) of the affected project have already been made aware of this vulnerability.

Description

This is an old, well-known case of Go module "typosquatting", however the github.com/siruspen/logrus package is impersonating the official github.com/sirupsen/logrus package, notice how the p and the s in the middle of "sirupsen" are swapped for "siruspen" instead.

This is documented in public talks and in public blog posts for a long time already, e.g. https://michenriksen.com/archive/blog/finding-evil-go-packages/#githubcomsiruspenlogrus-

The problem is that the malicious package is fiddling with their init function. This can potentially lead to fully RCE on machine executing this code.

At the time of writing and as far as I know, the only malicious behaviour of that package is to print "INIT" during its init:

logger.go
func init() {
	fmt.Println("INIT!!!")
}

This malicious package is imported by a few projects:
https://pkg.go.dev/github.com/siruspen/logrus?tab=importedby

and is still being cached by the Go proxy and cache despite having been removed from github:
https://github.com/siruspen/logrus

Affected Modules, Packages, Versions and Symbols

Module: github.com/siruspen/logrus
Package: github.com/siruspen/logrus
Versions:
  - Introduced: 1.7.1

CVE/GHSA ID

No response

Fix Commit or Pull Request

No response

References

Additional information

This is not fixed since this is a malicious package doing typosquatting of a popular package.

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

No branches or pull requests

2 participants