# Helmet: 8.2 out of 10

A strong pick. 2nd of 10 in [Web security libraries](https://elestia.ai/opensource/web-security/index.md).

Helmet is a small Express/Connect middleware with no dependencies. One call sets about a dozen sensible HTTP security headers, including a configurable Content-Security-Policy. For Node servers it remains the default way to set security headers, though it covers only the header part of this category's job.

**Best for:** Express, NestJS or Fastify (via @fastify/helmet) apps that want safe default security headers and a configurable CSP from one line of code.

## Scores

- **Overall: 8.2** (likely 7.1 to 8.9)
  - Claude Opus 5.5 (8.0): For Node servers built on Express, NestJS or Fastify, Helmet is the default way to set security headers. It is well made, safe, widely recommended and still maintained. It falls short of 9 because it is narrow: rate limiting, CORS and sanitizing need other peers, and modern framework or edge stacks often skip it. One main maintainer is a further risk.
  - GPT-6.2 Sol (8.3): Helmet is a strong pick for security headers in a new Express app because its defaults are useful, it remains maintained, and it brings in no runtime dependencies. Use express-rate-limit for request throttling and DOMPurify for HTML sanitization when those jobs are in scope. The main uncertainties are how much CSP tuning a particular app needs and how broadly release work is shared.
- **Needed by many: 5.9** (likely 4.9 to 7.0)
  - Claude Opus 5.5 (6.0): Most Node web servers should send security headers, so a large group of backend developers needs this. Helmet is built for Express/Connect-style middleware, though NestJS and Fastify (via a wrapper) use it too. Front-end-only and Next.js/edge projects usually set headers some other way.
  - GPT-6.2 Sol (5.8): Security headers matter to many web teams, and Express still leads back-end framework usage among State of JavaScript respondents. Helmet covers the response-header part of the category and is designed for Node-style middleware. The survey measures framework use, so it gives only an indirect estimate of how many teams need Helmet itself.
- **Helps a lot: 8.3** (likely 7.2 to 9.3)
  - Claude Opus 5.5 (8.0): It does its narrow job very well: safe defaults, an option for every header, dynamic CSP directives, typed options and clear errors for mistakes such as unquoted CSP keywords. There is little more a header library needs to do. It is held back by doing almost no checks on CSP quality and by its narrow scope within this category.
  - GPT-6.2 Sol (8.5): Version 8.3.0 provides configurable defaults for CSP, HSTS, and cross-origin policies, and improves how CSP errors reach Express. Built-in types and short examples give coding agents a straightforward starting point. Custom policies still need app-specific review, and there is little independent evidence on performance or agent-written configurations.
- **Holds up over time: 7.3** (likely 6.2 to 8.6)
  - Claude Opus 5.5 (7.0): The project is active: 72 commits in the last year, npm releases in May and July 2026, and only 4 open issues. The scope is mostly finished, so the slow release pace is not a worry, and the 8.0 breaking changes were small. The main risk is that one maintainer carries most of the work.
  - GPT-6.2 Sol (7.6): Helmet had 72 commits and two npm releases in the past year, with four open issues and one open pull request at the snapshot. The latest major upgrade changed HSTS defaults and tightened CSP input checks. Two npm collaborators are listed, but recent publishes came from one account, and the depth of funding and typical response times are unclear. NestJS now ships equivalent defaults, which reduces the need for Helmet in new Nest apps.
- **Used widely: 7.3** (likely 6.3 to 8.4)
  - Claude Opus 5.5 (7.5): About 92M downloads in 4 weeks and about 129k dependent repos make it very widely used. Some downloads come from @fastify/helmet and other packages that install it. Its year-over-year ratio of about 4.2 is right at the 4.1 median, so it is holding its share rather than gaining.
  - GPT-6.2 Sol (7.1): Ecosyste.ms found about 129,000 dependent repositories, second only to cors among peers with a count. Four-week downloads rose from 22.0 million to 91.9 million, or 4.18 times, just above the 4.1 catalog median and behind cors, express-rate-limit, and DOMPurify. That suggests only a small relative gain. The download count includes automated and indirect installs, and the collector found no recent Bluesky links or matched Hacker News stories to clarify the trend.
- **Vouched for: 7.8** (likely 6.7 to 8.8)
  - Claude Opus 5.5 (7.5): The Express project's own security best-practice guide recommends it, NestJS documents it, and the Fastify team maintains a plugin that wraps it. Tutorials from 2026 still treat it as the standard. There is no survey data or independent benchmark, and it gets almost no social attention.
  - GPT-6.2 Sol (8.0): Express recommends Helmet for production, Backstage integrates it into its backend router, and MDN demonstrates how to configure it for a deployed app. OWASP also lists it in its Secure Headers Project resources. Available independent testing covers Helmet as part of broader hardening, so its individual impact and developer satisfaction are less precisely measured.
- **Safe: 8.5** (likely 7.4 to 9.5)
  - Claude Opus 5.5 (8.5): It has no dependencies, no advisories ever, an MIT licence and a Scorecard of 7.1 with pinned dependencies, SAST and a security policy. Its weak checks are code review, fuzzing and CII best practices. Releases depend on a small number of publishers.
  - GPT-6.2 Sol (8.5): The package has a permissive MIT licence, zero runtime dependencies, and no known advisories in the sources checked. OpenSSF Scorecard gives it 7.1, with strong workflow permissions and a security policy, but zero scores for code review and fuzzing. Recent npm releases came from one account, and the available checks leave release signing and the publishing process unclear.

## Good

- One `app.use(helmet())` call sets about 13 safe headers, and each one can be configured or turned off.
- It has no dependencies, ships its own TypeScript types and has no security advisories on record.
- The Express docs recommend it, NestJS documents it, and the official Fastify plugin is built on it.
- 8.x releases tighten CSP checking and give clearer error messages without breaking existing code.

## Bad

- It only sets headers. You still need separate libraries for rate limiting, CORS, CSRF and HTML sanitizing.
- Next.js, Hono and edge runtimes set headers in their own ways, so Helmet is mostly useful on Express-style servers.
- One maintainer does most of the work, and changes get no second reviewer (Scorecard Code-Review is 0).
- It does little to check that your CSP is correct, so a weak policy can pass without warning.

## The numbers

- Downloads, 4 weeks: 92M
- In a year: ×4.2
- GitHub stars: 11k
- Commits, 12 months: 72
- Last npm release: Jul 2026
- Advisories, 24 months: 0
- Licence: MIT
- GitHub: https://github.com/helmetjs/helmet
- npm: https://www.npmjs.com/package/helmet

Scores run from 0 to 10 and are the mean of the scores of AI reviewers (Claude Opus 5.5, GPT-6.2 Sol), made on 22 November 2026 from GitHub, npm, OSV, OpenSSF Scorecard, ecosyste.ms, Hacker News and Bluesky data and a web search. The ecosyste.ms count of repositories that use a project is far too low for projects that grew in the last few years, and some reviews quote it. Overall is the reviewers' own judgement for a new project today, not an average of the parts. An AI wrote them and can be wrong.
