Security

Keep the trust boundary explicit.

event-pubsub dispatches application functions synchronously. It does not sandbox subscribers, serialize payloads, authorize event names, catch synchronous throws, or observe returned promises.

Trusted handlers

Register only code you intend to execute in the publisher's process and privilege context. A subscriber can mutate referenced payloads or throw.

Bounded lifecycle

Use off and reset when components are retired. Long-lived hubs retain registered functions and their captured state.

Safe names

Prototype-like strings such as __proto__, constructor, and toString are stored safely and regression-tested.

Supported release lines
Version lineStatusAction
6.1.1 on npm and GitHubCurrent supported releaseInstall on Node.js 22.12 or newer.
6.0.0 through 6.1.0Superseded 6.x releasesUpgrade to the current 6.x release.
5.x and olderSecurity fixes not plannedUpgrade to the latest 6.x release.
Report privately.

Do not open a public issue for a suspected vulnerability. Use the repository's private GitHub Security Advisory form with a minimal reproduction, impact, and affected versions.