TypeScript client for the European Union Vulnerability Database (EUVD) API.
- Official REST API docs: https://euvd.enisa.europa.eu/apidoc
- Prettier REST API docs: https://rud.is/euvd-api/
npm install @hrbrmstr/euvd
or
yarn add @hrbrmstr/euvd
import { EUVDClient } from '@hrbrmstr/euvd';
// Create a client with default options
const client = new EUVDClient();
// Get the latest vulnerabilities
async function getLatest() {
try {
const vulns = await client.getLatestVulnerabilities();
console.log(vulns);
} catch (error) {
console.error('Error fetching latest vulnerabilities:', error);
}
}
getLatest();
import { EUVDClient } from '@hrbrmstr/euvd';
// Create a client with custom options
const client = new EUVDClient({
baseUrl: 'https://euvdservices.enisa.europa.eu', // This is the default
timeout: 60000, // 60 seconds
axiosConfig: {
headers: {
'User-Agent': 'My-EUVD-Client/1.0'
}
}
});
import { EUVDClient } from '@hrbrmstr/euvd';
const client = new EUVDClient();
async function queryVulns() {
try {
// Find high severity vulnerabilities that are being exploited
const result = await client.queryVulnerabilities({
fromScore: 8,
toScore: 10,
exploited: true,
size: 100,
page: 0
});
console.log(`Found ${result.total} vulnerabilities`);
console.log(result.items);
} catch (error) {
console.error('Error querying vulnerabilities:', error);
}
}
queryVulns();
import { EUVDClient } from '@hrbrmstr/euvd';
const client = new EUVDClient();
async function getVulnById() {
try {
// Get details for a CVE
const vuln = await client.getVulnerabilityById('CVE-2025-24054');
console.log(vuln);
// Get details for a EUVD ID
const euvdEntry = await client.getEUVDById('EUVD-2025-4893');
console.log(euvdEntry);
} catch (error) {
console.error('Error fetching vulnerability:', error);
}
}
getVulnById();
The client provides the following methods:
-
getLatestVulnerabilities()
- Get the latest vulnerabilities (max 8) -
getLatestExploitedVulnerabilities()
- Get the latest exploited vulnerabilities (max 8) -
getLatestCriticalVulnerabilities()
- Get the latest critical vulnerabilities (max 8) -
queryVulnerabilities(params)
- Query vulnerabilities with various filters (max 100 per request) -
getEUVDById(id)
- Get detailed information about a specific EUVD entry -
getVulnerabilityById(id)
- Get detailed information about a vulnerability by ID (e.g., CVE) -
getAdvisoryById(id)
- Get detailed information about an advisory by ID
When using queryVulnerabilities()
, you can provide the following parameters:
-
fromScore
(0-10, e.g., fromScore=7.5) -
toScore
(0-10, e.g., toScore=10) -
fromEpss
(0-100, e.g., fromEpss=20) -
toEpss
(0-100, e.g., toEpss=90) -
fromDate
(YYYY-MM-DD, e.g., fromDate=2023-01-14) -
toDate
(YYYY-MM-DD, e.g., toDate=2025-01-14) -
product
(string, e.g., product=Windows) -
vendor
(string, e.g., vendor=Microsoft) -
assigner
(string, e.g., assigner=mitre) -
exploited
(true/false, e.g., exploited=true) -
page
(integer, starts at 0, e.g., page=2) -
text
(keywords, e.g., text=vulnerability) -
size
(integer, default 10, max 100, e.g., size=100)
MIT