Alerts This Week
Warning Icon 1 560
Alerts This Week
Warning Icon 1 560

Stay Ahead With Linux Security Features

Filter Icon Refine features
X Clear Filters
X Clear Filters
View More

Get the latest News and Insights

Get the latest Linux and open source security news straight to your inbox.

Community Poll

What got you started with Linux?

No answer selected. Please try again.
Please select either existing option or enter your own, however not both.
Please select minimum {0} answer(s).
Please select maximum {0} answer(s).
/main-polls/150-what-got-you-started-with-linux?task=poll.vote&format=json
150
radio
0
[{"id":483,"title":"Self-taught through trial and error","votes":548,"type":"x","order":1,"pct":78.51,"resources":[]},{"id":484,"title":"Formal training or courses","votes":30,"type":"x","order":2,"pct":4.3,"resources":[]},{"id":485,"title":"A job that required it","votes":34,"type":"x","order":3,"pct":4.87,"resources":[]},{"id":486,"title":"Other","votes":86,"type":"x","order":4,"pct":12.32,"resources":[]}] ["#ff5b00","#4ac0f2","#b80028","#eef66c","#60bb22","#b96a9a","#62c2cc"] ["rgba(255,91,0,0.7)","rgba(74,192,242,0.7)","rgba(184,0,40,0.7)","rgba(238,246,108,0.7)","rgba(96,187,34,0.7)","rgba(185,106,154,0.7)","rgba(98,194,204,0.7)"] 350
bottom 200
Loading...

Explore Latest Linux Security features

We found -4 articles for you...
102

The npm Supply Chain Problem: Why Installing Packages Executes Untrusted Code

Running npm install is a reflex at this point. You see a progress bar, a few hundred dependencies fly by, and the lockfile updates. You move on to the next task. But that command isn't just a file transfer. It is execution. And it runs with the same user permissions you use to check your email or push to production. The most dangerous code on a Linux system may execute before your application even starts. The recent npm supply chain attack on the Axios library showed how easily a postinstall script is weaponized. By exploiting npm lifecycle scripts , attackers turned a trusted utility into a delivery mechanism for a remote access trojan (RAT). This isn't about a bug in the code. It is about how the installation process is designed to work. . npm install Doesn’t Just Download Code, It Executes It We have conditioned ourselves to think of package managers as glorified downloaders. They aren't. They are execution engines. Modern development ecosystems run scripts during the install phase to handle tasks like compiling native extensions or setting up local environments. In the Node.js world, these are npm lifecycle scripts. If a package manifest contains a preinstall script or a postinstall script, npm runs that code. Automatically. This isn't a vulnerability or a clever hack: it’s the intended design of the tool. The pattern is everywhere. Python’s pip executes arbitrary code via setup.py . Rust’s cargo relies on build.rs to compile dependencies. These tools operate on a single, massive assumption: if you asked to install it, you’ve already decided to trust every line of code inside it. This Is a Software Supply Chain Attack: Not Just a Package Issue On March 31, 2026, the JavaScript community got a clear look at how this trust is turned against us. Attackers hijacked the maintainer account for Axios, a library used by millions . They didn’t even touch the Axios source code. They just added a new, malicious dependency called plain-crypto-js . This was a textbook software supply chain attack. It relied on transitive trust and indirect compromise. The attackers didn't need to break your server. They just poisoned a single third-party dependency deep in your tree. While this incident targeted npm identities, the pattern is part of a larger trend of executing unverified code across Git and CI/CD pipelines. When a developer ran npm install axios , the system resolved the tree and triggered a hook that pulled down a cross-platform RAT. The whole thing was over in seconds. There was no kernel exploit. No zero-day. The system executed the attacker’s code because that is how software supply chain security is currently architected. The Reality of Dependency Risk Every time you add a library, you aren't just adding one piece of code. You are inviting an entire dependency tree into your environment. Many of these are transitive dependencies, which are the libraries that your libraries depend on. You might only intend to use one trusted tool, but you are effectively granting execution rights to hundreds of authors you have never heard of. This creates a massive dependency management risk that stays hidden until an incident occurs. This Happens Inside the Trust Boundary This is why it is a Linux security problem. When you run an install command, those scripts run with your user permissions. They have immediate, quiet access to everything you touch on your developer workstation. The attack doesn't need to break in. It is already past the gates. It uses your identity to move files and talk to the network. This is a direct Linux privilege misuse. These scripts can easily exfiltrate: Your SSH keys in ~/.ssh/ Your .env files with production secrets Your cloud provider tokens and API keys Your browser sessions and cookies CI/CD runners usually have even more power. One npm install can compromise your entire pipeline before you even run a single test on your own code. Why Traditional Security Tools Miss This Mostof our security stack is built for the runtime. We use SELinux to sandbox a web server or AppArmor to restrict a browser. We watch firewalls for weird outbound traffic from long-running processes. But the installation process happens in the dark. This is a build-time execution gap. The execution is fast and ephemeral. Because it happens inside a process you already trust, it almost never trips an alarm. In the Axios attack, the malicious script cleaned up after itself , deleting its traces the moment the payload was delivered. Your security tools are looking for a long-running threat. They won't find it here. No binaries were changed. No new services were started. The breach is finished before the application even launches. Who Is Responsible for the Fix? In a decentralized ecosystem, accountability is fragmented. There is no single security officer for the Linux supply chain. Instead, the responsibility is split across layers that often point fingers at each other. The package registries, like npm and PyPI , are the first line of defense. Their job is to secure the source. In response to waves of account takeovers, they have started mandating two-factor authentication (2FA) for popular maintainers. They are also implementing automated malware scanning to catch malicious hooks. But these registries are archives, not auditors. They cannot realistically vet every line of code in the millions of packages they host. The tool maintainers, the teams behind npm , pip , and cargo , are the architects of the bridge. They are the ones who decide that install should also mean execute. There is a slow movement toward secure-by-default configurations, like proposals to sandbox build scripts. However, changing these defaults risks breaking the millions of legitimate builds that already exist. The system treats the package manager as a trusted agent of the user. This leaves the final layer of responsibility with the organization running the code. Security isn't just about what the registrycatches. It is about the execution boundaries you build on your own host. How to Reduce the Risk If the problem is that the Linux system trusts the wrong thing at the wrong time, the fix is to stop granting that trust by default. You can’t manually audit every line of a tree, but you can change how the system handles the installation. To achieve a secure npm install, the most immediate step is to break the link between downloading code and executing it. In the npm ecosystem, you can use npm ignore scripts security features by running: npm install --ignore-scripts This keeps the package on the disk but prevents the postinstall script from touching your CPU. For higher-stakes environments like CI/CD pipelines, the answer is containerized builds and network isolation. Instead of running installs on a host with access to your credentials, move the build to a restricted container using tools like Podman . If the code executes in a sandbox with no way to reach your .ssh folder or talk to the internet, the threat is contained. This Isn’t Just npm It is easy to blame JavaScript, but this is a structural reality. The Rust security model is open about the fact that the compiler assumes dependencies are trusted. You see the same pip install security risk in the Python world and cargo build script security concerns in Rust. Every modern package manager works the same way. The system runs foreign code just to get the software ready to build. The risk isn't just about where the code came from. It is about what the system does with it the second it arrives on the disk. Most teams think the clock starts when an application runs in production. It doesn't. The exposure starts much earlier. It starts when a dependency is installed, and the system executes code it was never actually meant to trust. FAQ: Understanding npm and Supply Chain Security What is an npm? The term npm refers to the Node Package Manager. It is a tool used by developers to share and install JavaScriptcode. It consists of a command-line client and a large online database of code called the npm registry. What is npm used for? Developers use npm modules to add functionality to their applications without writing everything from scratch. It automates the process of finding, installing, and updating code libraries. What are npm vulnerabilities? These are security flaws found in npm modules. They can range from accidental bugs that allow data leaks to npm vulnerabilities intentionally placed by attackers to steal credentials or gain remote access to a system. How does an npm supply chain attack work? This happens when an attacker compromises a legitimate package or its maintainer. When users download the updated version, they unknowingly install malicious code. Because these tools often run scripts during installation, the attack can execute before the developer even runs their application. Why is the Axios attack significant in software supply chain attack news? The Axios incident proved that even highly popular, trusted libraries are targets. It showed that attackers don't need to find a new bug in Linux: they can simply use the built-in features of an npm package manager to deliver malware. . npm install Doesn’t Just Download Code, It Executes It We have conditioned ourselves to thi. running, install, reflex, point, progress, hundred, dependencies. . MaK Ulac

Calendar 2 Apr 03, 2026 User Avatar MaK Ulac
News Add Esm H240

Get the latest News and Insights

Get the latest Linux and open source security news straight to your inbox.

Community Poll

What got you started with Linux?

No answer selected. Please try again.
Please select either existing option or enter your own, however not both.
Please select minimum {0} answer(s).
Please select maximum {0} answer(s).
/main-polls/150-what-got-you-started-with-linux?task=poll.vote&format=json
150
radio
0
[{"id":483,"title":"Self-taught through trial and error","votes":548,"type":"x","order":1,"pct":78.51,"resources":[]},{"id":484,"title":"Formal training or courses","votes":30,"type":"x","order":2,"pct":4.3,"resources":[]},{"id":485,"title":"A job that required it","votes":34,"type":"x","order":3,"pct":4.87,"resources":[]},{"id":486,"title":"Other","votes":86,"type":"x","order":4,"pct":12.32,"resources":[]}] ["#ff5b00","#4ac0f2","#b80028","#eef66c","#60bb22","#b96a9a","#62c2cc"] ["rgba(255,91,0,0.7)","rgba(74,192,242,0.7)","rgba(184,0,40,0.7)","rgba(238,246,108,0.7)","rgba(96,187,34,0.7)","rgba(185,106,154,0.7)","rgba(98,194,204,0.7)"] 350
bottom 200
Your message here