
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
fpavon-ee-shared
Advanced tools
Este documento explica cómo publicar paquetes en npm cuando la cuenta tiene autenticación en dos factores (2FA) habilitada, incluyendo el flujo completo de trabajo.
Modificar la versión actual por la nueva en package.json:
{
"version": "1.0.62"
}
📌 Seguir semver:
patch → fixes (1.0.61 → 1.0.62)minor → features (1.0.x → 1.1.0)major → breaking changesgit add .
git commit -m "chore: bump version to 1.0.62"
git push
👉 Esto asegura trazabilidad antes de publicar
npm run build
👉 Genera los archivos que realmente se publican (ej: /dist)
npm publish --otp=123456
npm publish
npm ERR! 403 Forbidden - Two-factor authentication required
👉 npm exige 2FA también al publicar
npm publish --otp=123456
https://www.npmjs.com/settings/tokens
npm config set //registry.npmjs.org/:_authToken=TU_TOKEN
npm publish
npm whoami
npm config get registry
Debe ser:
https://registry.npmjs.org/
Not found - PUT https://registry.npmjs.org/paquete
2FA required
--otpUnknown user config "config"
👉 No bloquea publicación
👉 Usar token con bypass 2FA Evita tener que ingresar OTP cada vez.
| Paso | Acción |
|---|---|
| 1 | Subir versión en package.json |
| 2 | Commit + push |
| 3 | npm run build |
| 4 | npm publish |
npm login
npm whoami
npm run build
npm publish
npm publish --otp=XXXXXX
npm config set //registry.npmjs.org/:_authToken=TOKEN
FAQs
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.