
Research
/Security News
jscrambler npm Package Compromised in Supply Chain Attack
A compromised jscrambler npm release added a malicious preinstall hook that runs hidden native binaries on Linux, macOS, and Windows.
@mastra/fastembed
Advanced tools
Affected versions:
This package provides a FastEmbed embedding model integration for use with Mastra Memory.
This package provides a FastEmbed embedding model integration for use with Mastra Memory.
Note: This functionality was previously included directly within @mastra/core. It has been moved to this separate package because fastembed-js relies on large native dependencies (like onnxruntime-node). Separating it keeps @mastra/core lightweight for users who may not need FastEmbed.
pnpm add @mastra/fastembed
This package supports AI SDK v5 (specification version v2). The default exports use v2, which is compatible with @mastra/core and AI SDK v5.
Breaking Change: Previous versions used AI SDK specification v1. If you need v1 compatibility for legacy code, use the Legacy exports.
import { Memory } from '@mastra/memory';
import { fastembed } from '@mastra/fastembed';
const memory = new Memory({
// ... other memory options
embedder: fastembed, // Uses v2 specification
});
// Now you can use this memory instance with an Agent
// const agent = new Agent({ memory, ... });
import { fastembed } from '@mastra/fastembed';
// Default export (bge-small-en-v1.5 with v2 spec)
const embedder = fastembed;
// Named exports for v2 models
const small = fastembed.small; // bge-small-en-v1.5
const base = fastembed.base; // bge-base-en-v1.5
// Legacy v1 models (for backwards compatibility)
const smallLegacy = fastembed.smallLegacy; // bge-small-en-v1.5 (v1 spec)
const baseLegacy = fastembed.baseLegacy; // bge-base-en-v1.5 (v1 spec)
import { embed } from 'ai';
import { fastembed } from '@mastra/fastembed';
const result = await embed({
model: fastembed,
value: 'Text to embed',
});
console.log(result.embedding); // number[]
This package wraps the fastembed-js library to provide an embedding model compatible with the AI SDK and Mastra.
FAQs
Unknown package
The npm package @mastra/fastembed receives a total of 12,411 weekly downloads. As such, @mastra/fastembed popularity was classified as popular.
We found that @mastra/fastembed demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 6 open source maintainers 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
/Security News
A compromised jscrambler npm release added a malicious preinstall hook that runs hidden native binaries on Linux, macOS, and Windows.

Research
/Security News
A malicious .NET package is typosquatting the Braintree SDK to steal live payment card data, merchant API keys, and host secrets from production apps.

Security News
/Research
Compromised Injective SDK npm version 1.20.21 exfiltrates wallet private keys and mnemonics through fake telemetry functionality.