Is axios safe?
- Node.js shell/command execution
- Node.js network egress
- npm prepare hook
axios is an AI npm_package analyzed by SkillTotal's deterministic static scanner. The scan found no malicious indicators, though 4 risky constructs are reported for review. It can: install time execution, network egress and shell execution — capabilities are what the code can do, not a verdict on intent. Risk score 10/100 (low).
axios 1.19.0
Automated static-analysis result. It can contain false positives and false negatives, and is not a claim about the intent of axios's authors. Report a false positive.
Behavioral traits
How this component maps to the CSA agentic threat model. Descriptive — it never affects the risk score.
Findings (4)
The component can run operating-system commands or spawn processes.
while ((matches = regExp.exec(str)) !== null) {while (match = tokensRE.exec(str)) {return parser.exec(value);
while ((match = pattern.exec(name)) !== null) {var match = /^([-+\w]{1,25}):(?:\/\/)?/.exec(url);while ((matches = regExp.exec(str)) !== null) {while ((match = tokensRE.exec(str))) {return parser.exec(value);
while ((match = pattern.exec(name)) !== null) {const match = /^([-+\w]{1,25}):(?:\/\/)?/.exec(url);while ((matches = regExp.exec(str)) !== null) {while ((match = tokensRE.exec(str))) {return parser.exec(value);
while ((match = pattern.exec(name)) !== null) {const match = /^([-+\w]{1,25}):(?:\/\/)?/.exec(url);while ((matches = regExp.exec(str)) !== null) {while (match = tokensRE.exec(str)) {return parser.exec(value);
while ((match = pattern.exec(name)) !== null) {const match = /^([-+\w]{1,25}):(?:\/\/)?/.exec(url);const match = DATA_URL_PATTERN.exec(uri);
while ((match = tokensRE.exec(str))) {return parser.exec(value);
while ((match = pattern.exec(name)) !== null) {const match = DATA_URL_PATTERN.exec(uri);
Why it matters: Powerful and often legitimate — confirm the commands aren't built from untrusted input.
Fix: Confirm the command and its arguments are fully controlled and not derived from untrusted input; prefer execFile with an argument array.
A server is bound to all network interfaces (0.0.0.0), not just your own machine.
const LOOPBACK_HOSTNAMES = new Set(['localhost', '0.0.0.0']);
Why it matters: Without authentication, other hosts on the network can reach it.
Fix: Bind to 127.0.0.1 for local-only use, or require authentication and restrict access if remote exposure is intended.
package.json has a 'prepare' script (runs on git/local installs and before publishing).
"prepare": "husky"
Why it matters: Usually a build step, but confirm it doesn't fetch or run remote code.
Fix: Usually a legitimate build step; confirm it only builds and does not fetch or execute remote code.
The component makes outbound network requests.
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.axios = factory());
// utils is a library of generic helper functions non-specific to axios
}("axios@".concat(Math.random()), []) : function (cb) {// but axios < v1.13.3 had it as enumerable
* This allows axios to run in a web worker, and react-native.
* `allows axios to run in a web worker`, the WebWorker will still be
* This leads to a problem when axios post `FormData` in webWorker
headers.set('User-Agent', 'axios/' + VERSION, false);// Allow for axios('example/url'[, config]) a la fetch API// Copy axios.prototype to instance
var axios = createInstance(defaults);
axios.Axios = Axios;
axios.CanceledError = CanceledError;
axios.CancelToken = CancelToken;
axios.isCancel = isCancel;
axios.VERSION = VERSION;
axios.toFormData = toFormData;
axios.AxiosError = AxiosError;
axios.Cancel = axios.CanceledError;
axios.all = function all(promises) {axios.spread = spread;
axios.isAxiosError = isAxiosError;
axios.mergeConfig = mergeConfig;
axios.AxiosHeaders = AxiosHeaders;
axios.formToJSON = function (thing) {Why it matters: Usually legitimate, but confirm the destinations are expected and no sensitive data leaves.
Fix: Confirm the destination hosts are expected and that no sensitive data is sent off-host.
Check your own component
Run the same evidence-backed scan on any MCP server, agent skill, or package.
Scan your own componentHow we determine this: deterministic static analysis (regex + AST), evidence-anchored, no code execution. Methodology →