<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Minimus</title>
    <description>The latest articles on DEV Community by Minimus (@minimus).</description>
    <link>https://dev.to/minimus</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3628940%2F6a6dd249-2eba-4a25-ab1b-513de4da92f3.jpg</url>
      <title>DEV Community: Minimus</title>
      <link>https://dev.to/minimus</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/minimus"/>
    <language>en</language>
    <item>
      <title>[Boost]</title>
      <dc:creator>Minimus</dc:creator>
      <pubDate>Thu, 19 Mar 2026 13:45:56 +0000</pubDate>
      <link>https://dev.to/minimus/-3fon</link>
      <guid>https://dev.to/minimus/-3fon</guid>
      <description>&lt;div class="ltag__link"&gt;
  &lt;a href="/katcosgrove" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__pic"&gt;
      &lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F294291%2Ff139e61e-c871-4168-8366-83bf664573b2.jpg" alt="katcosgrove"&gt;
    &lt;/div&gt;
  &lt;/a&gt;
  &lt;a href="https://dev.to/katcosgrove/when-projects-fail-why-companies-should-treat-open-source-as-infrastructure-32c0" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__content"&gt;
      &lt;h2&gt;When Projects Fail: Why Companies Should Treat Open Source as Infrastructure&lt;/h2&gt;
      &lt;h3&gt;Kat Cosgrove ・ Mar 18&lt;/h3&gt;
      &lt;div class="ltag__link__taglist"&gt;
        &lt;span class="ltag__link__tag"&gt;#opensource&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#security&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#kubernetes&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#devops&lt;/span&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/a&gt;
&lt;/div&gt;


</description>
      <category>opensource</category>
      <category>security</category>
      <category>kubernetes</category>
      <category>devops</category>
    </item>
    <item>
      <title>New Vulnerabilities in runC Allow Container Escape</title>
      <dc:creator>Minimus</dc:creator>
      <pubDate>Wed, 17 Dec 2025 14:00:00 +0000</pubDate>
      <link>https://dev.to/minimus/new-vulnerabilities-in-runc-allow-container-escape-3nmk</link>
      <guid>https://dev.to/minimus/new-vulnerabilities-in-runc-allow-container-escape-3nmk</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7d4blk0k7obvzq5q531s.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7d4blk0k7obvzq5q531s.png" alt="new CVEs in runC allow container escape" width="800" height="527"&gt;&lt;/a&gt;&lt;em&gt;Minimus builds secure, minimal container images and publishes technical research on container security.&lt;/em&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Originally published on minimus.io. Shared here for the developer community.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;p&gt;Recently, three high severity vulnerabilities &lt;a href="https://seclists.org/oss-sec/2025/q4/138" rel="noopener noreferrer"&gt;were disclosed&lt;/a&gt; in runC, the low-level container runtime used by Docker, containerd, Kubernetes, and other container platforms. By exploiting these vulnerabilities, it is possible to bypass container isolation boundaries and break out of the container to the underlying host.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is runC?
&lt;/h2&gt;

&lt;p&gt;runC is the low-level container runtime that Docker, containerd, Kubernetes, CRI-O and others rely on to actually create containers and set up their isolation. While it exposes a CLI, its real role is behind the scenes: configuring namespaces, cgroups, mounts, and setting up the container’s filesystem and other interfaces before your container process starts.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why runC Vulnerabilities Matter for Docker and Kubernetes Security
&lt;/h2&gt;

&lt;p&gt;Because runC is responsible for container isolation, any vulnerability affecting runC potentially affects the security boundary between the isolated container and the underlying host. This is why, for example, any workload running on top of Kubernetes can be affected.&lt;/p&gt;

&lt;h2&gt;
  
  
  Breaking Down &lt;a href="https://github.com/opencontainers/runc/security/advisories/GHSA-9493-h29p-rfm2" rel="noopener noreferrer"&gt;CVE-2025-31133&lt;/a&gt;: “Masking” Turns Into Arbitrary Mount Gadget
&lt;/h2&gt;

&lt;p&gt;The OCI runtime specification has a &lt;code&gt;maskedPath&lt;/code&gt; feature that is supposed to hide sensitive files and directories (e.g. &lt;code&gt;/proc/kcore, /proc/sysrq-trigger&lt;/code&gt;) by mounting something harmless on top. This protects against privileged users in non-user-namespaced being able to write to files or access directories that would provide sensitive information or allow containers to perform destructive or other privileged operations on the host.&lt;/p&gt;

&lt;p&gt;Files are masked by mounting the container’s &lt;code&gt;/dev/null&lt;/code&gt; on top of the masked path.&lt;br&gt;&lt;br&gt;
In vulnerable versions of runC, the issue is that runC didn’t verify that the source of the bind-mount (container’s &lt;code&gt;/dev/null&lt;/code&gt;) was a real &lt;code&gt;/dev/null&lt;/code&gt;. If an attacker races and swaps it with a symlink to an attacker-controlled path, they could cause runC to bind-mount an arbitrary source path to a path inside the container, which can lead to a container escape.&lt;/p&gt;

&lt;h2&gt;
  
  
  Breaking Down &lt;a href="https://github.com/opencontainers/runc/security/advisories/GHSA-qw9x-cqr3-wc7r" rel="noopener noreferrer"&gt;CVE-2025-52565&lt;/a&gt;: &lt;code&gt;/dev/console&lt;/code&gt; Bind-Mount Race
&lt;/h2&gt;

&lt;p&gt;This is pretty similar in concept to the above mentioned CVE, but with a different target. runC bind-mounts &lt;code&gt;/dev/pts/$n&lt;/code&gt; to &lt;code&gt;/dev/console&lt;/code&gt; inside the container for interactive consoles. If an attacker races and swaps it with a symlink to an attacker-controlled path, runC will bind mount whatever that symlink points to.&lt;/p&gt;

&lt;p&gt;Since &lt;code&gt;/dev/console&lt;/code&gt; bind mount happens before &lt;code&gt;maskedPaths&lt;/code&gt; and &lt;code&gt;readonlyPaths&lt;/code&gt; security features are applied, the attacker can potentially gain write access, which can lead to a container breakout.&lt;/p&gt;

&lt;h2&gt;
  
  
  Breaking Down &lt;a href="https://github.com/opencontainers/runc/security/advisories/GHSA-cgrx-mc8f-2prm" rel="noopener noreferrer"&gt;CVE-2025-52881&lt;/a&gt;: LSM Bypass &amp;amp; Arbitrary &lt;code&gt;/proc&lt;/code&gt; Write Gadgets
&lt;/h2&gt;

&lt;p&gt;This is a more advanced variation of an older procfs/LSM vulnerability &lt;a href="https://github.com/advisories/GHSA-fh74-hm69-rqjw" rel="noopener noreferrer"&gt;CVE–2019-19921&lt;/a&gt;. The flaw is in how runC handles writes to a &lt;code&gt;/proc&lt;/code&gt; during container setup.&lt;br&gt;&lt;br&gt;
With the right timing and mount tricks, an attacker can potentially redirect these writes to other, more dangerous files such as &lt;code&gt;sysrq-trigger&lt;/code&gt; or &lt;code&gt;core-pattern&lt;/code&gt;, which could lead to a container escape bypassing LSM label protections.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Is the Exploitability of These runC Vulnerabilities?
&lt;/h2&gt;

&lt;p&gt;In order to be able to exploit above mentioned vulnerabilities, an attacker would need the ability to start containers with custom mount/runtime configs or to supply Dockerfiles that use custom mounts/clever build tricks via different tactics of a supply chain attack. Such can be achieved via malicious container images or Dockerfiles.&lt;/p&gt;

&lt;h2&gt;
  
  
  Which runC Versions Are Affected?
&lt;/h2&gt;

&lt;h3&gt;
  
  
  CVE-2025-31133
&lt;/h3&gt;

&lt;p&gt;Affected versions: All&lt;br&gt;&lt;br&gt;
Fixed: 1.2.8, 1.3.3, 1.4.0-rc.3, and later&lt;/p&gt;

&lt;h3&gt;
  
  
  CVE-2025-52565
&lt;/h3&gt;

&lt;p&gt;Affected versions: v1.0.0-rc3 and later&lt;br&gt;&lt;br&gt;
Fixed: 1.2.8, 1.3.3, 1.4.0-rc.3, and later&lt;/p&gt;

&lt;h3&gt;
  
  
  CVE-2025-52881
&lt;/h3&gt;

&lt;p&gt;Affected versions: All&lt;br&gt;&lt;br&gt;
Fixed: 1.2.8, 1.3.3, 1.4.0-rc.3&lt;/p&gt;

&lt;h2&gt;
  
  
  Next Steps: How to Patch and Mitigate Vulnerable runC Versions
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;If you are running vulnerable versions of runC, upgrade to 1.2.8, 1.3.3, 1.4.0-rc.3 accordingly (or follow with vendor equivalent patches and instructions)
&lt;/li&gt;
&lt;li&gt;Verify the sources of container images and Dockerfiles
&lt;/li&gt;
&lt;li&gt;Follow security hygiene/good practices:

&lt;ul&gt;
&lt;li&gt;Use &lt;code&gt;user namespaces&lt;/code&gt; to map container &lt;code&gt;root&lt;/code&gt; to an unprivileged user on the host system
&lt;/li&gt;
&lt;li&gt;Prefer rootless containers when possible
&lt;/li&gt;
&lt;li&gt;Run applications as non-root inside the container to minimize risks&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;h2&gt;
  
  
  How can Minimus help?
&lt;/h2&gt;

&lt;p&gt;Our team is constantly tracking vulnerabilities that might expose our images and packages to potential risks. As a provider of secure, minimal container images, we ensure that foundational components stay hardened and up to date.&lt;br&gt;&lt;br&gt;
When issues like these runC CVEs are disclosed, we patch and rebuild affected components, making sure that images that are relying on runC are secure from the above mentioned vulnerabilities.&lt;br&gt;&lt;br&gt;
If you want to stay ahead of container-runtime vulnerabilities, &lt;a href="https://www.minimus.io/get-started" rel="noopener noreferrer"&gt;explore Minimus images&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7wobxxfd8261hnti7juw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7wobxxfd8261hnti7juw.png" alt="Minimus security advisories: runC" width="800" height="306"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;Originally published on minimus.io: &lt;a href="https://www.minimus.io/post/new-vulnerabilities-in-runc-allow-container-escape-what-docker-and-kubernetes-users-need-to-know" rel="noopener noreferrer"&gt;https://www.minimus.io/post/new-vulnerabilities-in-runc-allow-container-escape-what-docker-and-kubernetes-users-need-to-know&lt;/a&gt;&lt;/p&gt;

</description>
      <category>security</category>
      <category>opensource</category>
      <category>devops</category>
      <category>kubernetes</category>
    </item>
    <item>
      <title>Sha1-Hulud 2.0 - The Second Coming: A Technical Breakdown</title>
      <dc:creator>Minimus</dc:creator>
      <pubDate>Mon, 15 Dec 2025 19:19:17 +0000</pubDate>
      <link>https://dev.to/minimus/sha1-hulud-20-the-second-coming-a-technical-breakdown-2d0n</link>
      <guid>https://dev.to/minimus/sha1-hulud-20-the-second-coming-a-technical-breakdown-2d0n</guid>
      <description>&lt;p&gt;&lt;em&gt;Minimus builds secure, minimal container images and publishes technical research on container security.&lt;/em&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Originally published on minimus.io. Shared here for the developer community.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Sha1-Hulud 2.0 - The Second Coming: What You Need to Know
&lt;/h2&gt;

&lt;p&gt;Earlier this year on &lt;a href="https://www.cisa.gov" rel="noopener noreferrer"&gt;September 25&lt;/a&gt;, the open-source software community was hit by a supply chain attack called Sha1-Hulud, in which a self-replicating worm heavily impacted the NPM ecosystem by compromising hundreds of open-source software packages. &lt;/p&gt;

&lt;p&gt;After gaining initial access to a victim’s endpoint via the compromised third party package, the malicious script scanned the environment for credentials including GCP, AWS, Azure, and GitHub Personal Access Tokens. Once found, the data was exfiltrated to the endpoint controlled by the threat actor. On November 24th, Sha1-Hulud returned with a new version. Here is what you need to know.&lt;/p&gt;

&lt;h2&gt;
  
  
  Sha1-Hulud 2.0: What happened?
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;A new variant of Sha1-Hulud Software Supply Chain attack emerged
&lt;/li&gt;
&lt;li&gt;Over 25K GitHub repositories were affected
&lt;/li&gt;
&lt;li&gt;Hundreds of NPM packages were infected, including few of the famous projects

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://blog.postman.com" rel="noopener noreferrer"&gt;Postman&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.zapier.com" rel="noopener noreferrer"&gt;Zapier&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://posthog.com" rel="noopener noreferrer"&gt;Posthog&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;Thousands of files were exfiltrated containing:

&lt;ul&gt;
&lt;li&gt;NPM tokens&lt;/li&gt;
&lt;li&gt;Cloud Service Providers keys (AWS, GCP, Azure)&lt;/li&gt;
&lt;li&gt;GitHub tokens&lt;/li&gt;
&lt;li&gt;GitHub actions secrets&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;Sha1-Hulud 2.0 is able to self-replicate and infect additional projects in the ecosystem&lt;/li&gt;

&lt;/ul&gt;

&lt;h2&gt;
  
  
  How the Sha1-Hulud 2.0 Attack Works
&lt;/h2&gt;

&lt;p&gt;Sha1-Hulud 2.0 uses a layered, multi-stage infection process designed to blend into normal package installation workflows. By abusing npm lifecycle scripts, and harvesting cloud and GitHub credentials, the worm can silently compromise a developer’s environment and spread across the broader ecosystem.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 1: &lt;code&gt;package.json&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;When a package is compromised, two files are added to the root directory of the package:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;code&gt;setup_bun.js&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;bun_environment.js&lt;/code&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The infection is triggered by the following preinstall script that is added to &lt;code&gt;package.json&lt;/code&gt; of the compromised package.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fq07jzrstib2afoi3ydfo.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fq07jzrstib2afoi3ydfo.png" alt="package.json snippet showing a malicious preinstall script that runs node setup_bun.js during npm install&amp;lt;br&amp;gt;
" width="506" height="89"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After a victim executes &lt;code&gt;npm install&lt;/code&gt;, npm will execute lifecycle scripts where preinstall scripts will execute first (before the actual install). The same behavior will take place even if the victim is not directly interacting with the infected package and the package is coming as a transitive dependency; or if the installation fails, the preinstall script will run first.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 2: &lt;code&gt;setup_bun.js&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;setup_bun.js&lt;/code&gt; serves as an entry point. Its main objective is:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Check if the &lt;a href="https://bun.com" rel="noopener noreferrer"&gt;Bun&lt;/a&gt; (JavaScript runtime) is installed on the victim’s endpoint

&lt;ul&gt;
&lt;li&gt;This is an interesting behavior that was likely intended to avoid using Node.js and its protections, such as warnings about suspicious lifecycle scripts.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9610j0rsom7jn2rnl9o0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9610j0rsom7jn2rnl9o0.png" alt="Public GitHub repository created by the Sha1-Hulud 2.0 worm containing cloud.json, contents.json, environment.json, truffleSecrets.json, and a .github/workflows directory&amp;lt;br&amp;gt;
" width="800" height="171"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Depending on the operating system, it downloads and installs Bun if not present&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F81andrfpqnepcqozo9nr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F81andrfpqnepcqozo9nr.png" alt="Heavily obfuscated JavaScript code from bun_environment.js used by Sha1-Hulud 2.0 to collect environment data, harvest secrets, and propagate the infection&amp;lt;br&amp;gt;
" width="800" height="528"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Reload user’s &lt;code&gt;PATH&lt;/code&gt; to make sure Bun binary is useable&lt;/li&gt;
&lt;li&gt;Run &lt;code&gt;bun_environment.js&lt;/code&gt; using Bun&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Step 3: &lt;code&gt;bun_environment.js&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;This is a heavily obfuscated JS file, over 200K lines of obfuscated code, and it is the heart of a Sha1-Hulud 2.0 worm. Its purpose is to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Fingerprint victims environment&lt;/li&gt;
&lt;li&gt;Collect environment variables&lt;/li&gt;
&lt;li&gt;Enumerate local projects and Git repositories&lt;/li&gt;
&lt;li&gt;There is an indication that Sha1-Hulud 2.0 is utilizing &lt;a href="https://github.com" rel="noopener noreferrer"&gt;TruffleHog&lt;/a&gt; open-source tool secrets scanner to scan for secrets

&lt;ul&gt;
&lt;li&gt;Scan for cloud service providers related secrets (GCP, AWS, Azure)&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdksqan58tydqk6a0sz78.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdksqan58tydqk6a0sz78.png" alt="JavaScript code fetching the latest TruffleHog release from the GitHub API, indicating reuse of open source tooling for secret scanning&amp;lt;br&amp;gt;
" width="800" height="77"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Abusing NPM tokens — once it obtained victim’s NPM tokens Sha1-Hulud 2.0 has control over the projects maintained by the victim, which allows the worm to perform a self-propagation step by updating and publishing packages with same preinstall script&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1l9jauqx7vqpz715t4zr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1l9jauqx7vqpz715t4zr.png" alt="JavaScript function that downloads and installs the Bun runtime using PowerShell on Windows or curl and bash on Linux and macOS&amp;lt;br&amp;gt;
" width="800" height="610"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;If no GitHub or NPM tokens are found, it will fallback to deleting data in the victim’s endpoint home directory, depending on the operating system.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Step 4: Exfiltration via Public GitHub Repositories
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;The data collected by the NPM worm is exfiltrated via a public GitHub repository

&lt;ul&gt;
&lt;li&gt;A random 18 characters long string generated for a repository name which is published as a public repository under a compromised account with a fixed description name &lt;code&gt;Sha1-Hulud: The Second Coming&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;The repository contains several files with a double encoded Base64 string containing the collected victim’s data&lt;/li&gt;
&lt;li&gt;&lt;code&gt;cloud.json&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;contents.json&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;environment.json&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;truffleSecrets.json&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;If no GitHub credentials are found, the worm will use other victims’ compromised GitHub credentials. This is why we see many different random repositories under the same account. One compromised account can publish several repositories containing exfiltrated data of several other victims.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;github/workflows&lt;/code&gt; directory containing &lt;code&gt;discussion.yaml&lt;/code&gt; file&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fz7gyfkrujufuzr25p27f.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fz7gyfkrujufuzr25p27f.png" alt="JavaScript function checking whether the Bun executable is available on the system PATH across Windows and Unix-based platforms&amp;lt;br&amp;gt;
" width="800" height="237"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The injected workflow by the Sha1-Hulud will be triggered whenever someone creates or updates a GitHub discussion&lt;/li&gt;
&lt;li&gt;Forced execution on a self-hosted runner — If a victim configured self-hosted runners, Github Actions runners will run arbitrary code supplied by the attacker&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;RUNNER_TRACKING_ID: 0&lt;/code&gt; — known trick to suppress runner telemetry or GitHub tracking features&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;run: echo ${{ github.event.discussion.body }}&lt;/code&gt; — used to verify code execution. echo can be replaced with any arbitrary command&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgl3ic0d5cb0jh1yrtenw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgl3ic0d5cb0jh1yrtenw.png" alt="GitHub Actions workflow triggered on discussion events that runs on a self-hosted runner with RUNNER_TRACKING_ID set to 0 and echoes discussion content&amp;lt;br&amp;gt;
" width="776" height="434"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  IOCs (Indicators of Compromise) for SHA1-Hulud 2.0
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Preinstall scripts in package.json files
&lt;/li&gt;
&lt;li&gt;Unintended installation of Bun software
&lt;/li&gt;
&lt;li&gt;Public GitHub repository created with 18 digit random string under your account
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;setup_bun.js&lt;/code&gt; and &lt;code&gt;bun_environment.js&lt;/code&gt; files present on an endpoint&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What to Do if You Are Affected by SHA1-Hulud 2.0
&lt;/h2&gt;

&lt;p&gt;Remediations steps should include the following:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Remove the infected packages and scan across all endpoints you suspect that might be affected
&lt;/li&gt;
&lt;li&gt;Rotate and revoke any affected credentials
&lt;/li&gt;
&lt;li&gt;Temporary restrict repository creation until the investigation is finished
&lt;/li&gt;
&lt;li&gt;Delete public repositories that were created by the Sha1-Hulud 2.0 worm
&lt;/li&gt;
&lt;li&gt;Apply third party dependencies hygiene:

&lt;ul&gt;
&lt;li&gt;Constantly scan transitive dependencies for malicious activity
&lt;/li&gt;
&lt;li&gt;Use reliable sources for installing third party OSS (commit hashes, trusted versions etc)
&lt;/li&gt;
&lt;li&gt;If using NPM, think of applying &lt;code&gt;npm ci&lt;/code&gt; instead of &lt;code&gt;npm install&lt;/code&gt; for automated environments
&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;Check for additional connected environments and accounts that might be affected&lt;/li&gt;

&lt;/ul&gt;

&lt;h2&gt;
  
  
  How can Minimus help?
&lt;/h2&gt;

&lt;p&gt;After reading how Sha1-Hulud 2.0 is infecting projects across the NPM ecosystem and the possible damage, you probably understand that an endpoint can be compromised even if it does not interact with the infected package directly. It is enough to build an artifact containing an infected package as a transitive dependency to get infected by the NPM worm, and we all know how easy it is to miss that!&lt;/p&gt;

&lt;p&gt;At Minimus, we make sure our images are built using trusted and verified OSS and third party components. By controlling the entire supply chain, endpoints utilizing our images are protected from such supply chain attacks. This eliminates a major source of stress for DevSecOps teams and developers, allowing them to rely on images that are secure by default rather than struggling to build safe, non-vulnerable image versions on their own.&lt;/p&gt;




&lt;p&gt;Originally published on minimus.io: &lt;a href="https://www.minimus.io/post/sha1-hulud-2-0-the-second-coming-what-you-need-to-know" rel="noopener noreferrer"&gt;https://www.minimus.io/post/sha1-hulud-2-0-the-second-coming-what-you-need-to-know&lt;/a&gt;&lt;/p&gt;

</description>
      <category>security</category>
      <category>opensource</category>
      <category>devops</category>
      <category>javascript</category>
    </item>
  </channel>
</rss>
