CVE-2022-31103: lettersanitizer - Denial of Service Vulnerability

lettersanitizer Updated 02 Oct 2025

Summary

23/06/2022
Yes i
High
7.5

CVE-2022-31103: Improper handling of CSS at-rules in lettersanitizer. Affects lettersanitizer versions < 1.0.2. Fixed in 1.0.2. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

Background

lettersanitizer is an npm package that provides a sanitization utility for letters generated by the react-letter library. It is used to process CSS at-rules in letters and ensure their safe rendering. The package is widely relied upon by applications utilizing react-letter for generating dynamic letters.

However, versions of lettersanitizer prior to 1.0.2 are susceptible to a denial of service vulnerability when handling a CSS at-rule called @keyframes. This vulnerability can be exploited to cause a denial of service, potentially impacting the availability of affected applications.

Vulnerability Detail

The vulnerability in lettersanitizer arises from improper handling of the CSS at-rule @keyframes. By crafting a malicious letter containing a specially crafted @keyframes at-rule, an attacker can trigger a denial of service condition in applications that utilize lettersanitizer. This can lead to unresponsive or unavailable services, impacting the availability of the affected application.

The vulnerability has been assigned a CVSS score of 7.5, indicating a high severity level.

How To Fix

Latest published version: 1.0.9 as of 22 Oct 2026

npm install lettersanitizer@1.0.9

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

1.0.2

This is the first release that contains the fix.

npm install lettersanitizer@1.0.2

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

There is no known workaround for this vulnerability. It is essential to upgrade to lettersanitizer version 1.0.2 or later to mitigate the risk.

Conclusion

The lettersanitizer package, used for sanitizing letters in react-letter, is vulnerable to a denial of service issue when processing a CSS at-rule called @keyframes. This vulnerability can be mitigated by upgrading to lettersanitizer version 1.0.2 or later. It is crucial to promptly apply the patch to ensure the continued secure processing of CSS at-rules in letters. For further support on vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for lettersanitizer →

Share this vulnerability

FAQ

lettersanitizer is an npm package used for sanitizing letters generated by the react-letter library. It ensures the safe rendering of CSS at-rules in letters.

The vulnerability allows an attacker to trigger a denial of service condition in applications that utilize lettersanitizer. This can lead to unresponsive or unavailable services, impacting the availability of the affected application.

To fix this vulnerability, it is recommended to upgrade lettersanitizer to version 1.0.2 or later.

There is no known workaround for this vulnerability. Upgrading to the patched version is the only solution.

The CVSS score assigned to this vulnerability is 7.5, indicating a high severity level.

Sponsored Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

How To Fix

Latest published version: 1.0.9 as of 22 Oct 2026

npm install lettersanitizer@1.0.9

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

1.0.2

This is the first release that contains the fix.

npm install lettersanitizer@1.0.2

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback