
Research
Malicious npm Package Brand-Squats TanStack to Exfiltrate Environment Variables
A brand-squatted TanStack npm package used postinstall scripts to steal .env files and exfiltrate developer secrets to an attacker-controlled endpoint.
cors-express2
Advanced tools
A simple Express middleware to enable cross origin resource sharing on a route. It will deals with access-control-allow-origin, access-control-allow-credentials, access-control-request-headers and access-control-allow-methods headers. OPTIONS preflight requests will be directly answered with a HTTP 200 - OK.
var Express = require('express');
var cors = require('cors');
var app = Express();
express.use(cors({
allowWithoutOrigin: true,
onlyAllowedOrigin: true,
allowCredentials: true,
allowedOrigins: [
'http://127.0.0.1:8181',
'http://localhost:8181'
],
nullOrigin: 'null'
}));
allowWithoutOrigin: if true, allow requests without origin, setting access-control-allow-origin=*onlyAllowedOrigin: if true, requires the origin to be in the list of allowed originsallowCredentials: if true, will set access-control-allow-credentials=trueallowedOrigins: an array of string representing the allowed originsnullOrigin: set the string corresponding to null origin, most likely the default will always be okFAQs
Express middleware to enable cross origin resource sharing on a route
The npm package cors-express2 receives a total of 3 weekly downloads. As such, cors-express2 popularity was classified as not popular.
We found that cors-express2 demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
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.

Research
A brand-squatted TanStack npm package used postinstall scripts to steal .env files and exfiltrate developer secrets to an attacker-controlled endpoint.

Research
Compromised SAP CAP npm packages download and execute unverified binaries, creating urgent supply chain risk for affected developers and CI/CD environments.

Company News
Socket has acquired Secure Annex to expand extension security across browsers, IDEs, and AI tools.