Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
A CommonJS library for working with Common Vulnerability Scoring System vectors and scores.
A CommonJS library for working with Common Vulnerability Scoring System vectors and scores.
npm i cvss
var cvss = require('cvss');
var score = cvss.getScore('CVSS:3.0/AV:P/AC:H/PR:N/UI:R/S:C/C:L/I:H/A:L');
console.log(score) // => 6.2
var rating = cvss.getRating(score);
console.log(rating) // => Medium
This is the main scoring method. It may be called with either a valid CVSS3 vector string ('CVSS:3.0/AV:P/AC:H/PR:N/UI:R/S:C/C:L/I:H/A:L'
) or an object containing the key/value pairs ({ AV: 'P', AC: 'H', PR: 'N', UI:'R', S: 'C', C: 'L', I: 'H', A: 'L' }
) corresponding to one as its input parameter.
The optional options parameter controls whether validation errors throw or not and whether optional temporal and environmental metrics are considered in score calculation
options
Accepts the same arguments as getScore above, but enforces the baseOnly option.
Accepts the same arguments as getScore above, but enforces the temporal option.
Accepts the same arguments as getScore above, but enforces the environmental option.
Given a numeric score, returns the appropriate CVSS3 severity rating for that number: None for scores < 0.1, Low for scores >= 0.1 and < 4, Medium for scores >=4 and < 7, High for scores >= 7 and < 9, Critical for scores >= 9.
Returns an object with the base score and its rating. Equivalent to
{
score: getBaseScore(input),
rating: getRating(getBaseScore(input))
}
Returns an object with the environmental score and its rating. Equivalent to
{
score: getEnvironmentalScore(input),
rating: getRating(getEnvironmentalScore(input))
}
Returns an object with the environmental score and its rating. Equivalent to
{
score: getTemporalScore(input),
rating: getRating(getTemporalScore(input))
}
Returns object with the score and rating for all three scores:
{
base: getBase(input),
temporal: getTemporal(input),
environmental: getEnvironmental(input)
}
FAQs
A CommonJS library for working with Common Vulnerability Scoring System vectors and scores.
We found that cvss 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.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.