Security
Headlines
HeadlinesLatestCVEs

Headline

CVE-2022-25872: Out-of-bounds Read in fast-string-search | CVE-2022-25872 | Snyk

All versions of package fast-string-search are vulnerable to Out-of-bounds Read due to incorrect memory freeing and length calculation for any non-string input as the source. This allows the attacker to read previously allocated memory.

CVE
#js

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

  • snyk-id

    SNYK-JS-FASTSTRINGSEARCH-2392368

  • published

    16 Jun 2022

  • disclosed

    3 Feb 2022

  • credit

    Cristian-Alexandru Staicu

How to fix?

There is no fixed version for fast-string-search.

Overview

fast-string-search is a module that can search substrings in a string by using N-API and boyer-moore-magiclen.

Affected versions of this package are vulnerable to Out-of-bounds Read due to incorrect memory freeing and length calculation for any non-string input as the source. This allows the attacker to read previously allocated memory.

###PoC

const fss = require('fast-string-search');
fss.indexOf("My password is joke 9", "is"); 
let res = fss.indexOf(1, "9"); 
// res will contain the index of "9" from the previous input and not the current one.
console.log(res)

Related news

GHSA-hmqg-p8f8-3qrw: Out-of-bounds Read in fast-string-search

All versions of package fast-string-search are vulnerable to Out-of-bounds Read due to incorrect memory freeing and length calculation for any non-string input as the source. This allows the attacker to read previously allocated memory.

CVE: Latest News

CVE-2023-50976: Transactions API Authorization by oleiman · Pull Request #14969 · redpanda-data/redpanda
CVE-2023-6905
CVE-2023-6903
CVE-2023-6904
CVE-2023-3907