Malicious code in uznex-api (RubyGems)
- GHSA-rw95-hcmf-x637
Description
The gemspec declares extconf.rb as a native extension, so the script executes automatically during `gem install`. Rather than configuring a build, extconf.rb collects host and process identifiers (hostname, working directory, user, PID), container fingerprints read from /proc/1/cmdline and /proc/1/cgroup, Gemfile and Gemfile.lock contents, the installed gem list, and a filtered dump of environment variables selected by credential-shaped patterns (TOKEN, KEY, SECRET, AWS, GITHUB, NPM, GEM, BUNDLE, KUBE, DOCKER). The collected JSON is sent via an HTTPS PUT to a hardcoded bucket endpoint at uznex-front.s3.eu-central-1.amazonaws.com under an /i18372/beacon/ path. The gem's library code is an inert stub providing no advertised functionality, and no native source tree accompanies the declared extension. Developer and CI environments routinely hold deploy, registry, and cloud credentials in exactly the variables matched by this filter. --- Credit: [OpenSSF](https://github.com/ossf/malicious-packages) ([source](https://github.com/ossf/malicious-packages/blob/dc33bf8d560c78ba17929d8060e49725be68362e/osv/malicious/rubygems/uznex-api/MAL-2026-21155.json))
Text from the GitHub Advisory record.
Recommendation
Remove the package and rotate any secret the machine that installed it could reach. There is no version to update to.
Affected
uznex-apiRubyGems
No versions listed
Timeline
- Published
Related news
No article from the followed outlets names this vulnerability.