Vulnerabilities in pkg:npm/tiny-csrf

PACKAGE
Advisory Identifier: GHSA-pj2c-h76w-vv6f
Advisory Summary

CVE-2022-39287 is a HIGH (CVSS 8.1) tiny-csrf has openly visible csrf vulnerability (CWE-319: Cleartext Transmission of Sensitive Information) affecting Tiny csrf libraries in the npm ecosystem. The issue involves tiny-csrf has openly visible csrf tokens. Remediation is available by upgrading affected packages to version 1.1.0.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:npm/tiny-csrf

1 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:npm/tiny-csrf. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-pj2c-h76w-vv6f CVE-2022-39287 HIGH tiny-csrf has openly visible CSRF tokens

CVE-2022-39287 at a Glance

CVE Identifier CVE-2022-39287
GHSA Identifier GHSA-pj2c-h76w-vv6f
Severity HIGH
CVSS v3.1 Base Score 8.1
CWE Classification CWE-319: Cleartext Transmission of Sensitive Information
Affected Product Tiny csrf
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 8.1

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction Required (UI:R)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity High (I:H)
Availability None (A:N)

How to Fix CVE-2022-39287

To remediate this vulnerability, upgrade all affected Tiny csrf dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

tiny-csrf fixed: 1.1.0
npm install tiny-csrf@1.1.0
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

npm ls tiny-csrf

How to Check if You Are Affected

To determine whether your Node.js application is affected by CVE-2022-39287, inspect your project dependencies using npm:

npm ls tiny-csrf

Analyze the terminal output to locate any version of Tiny csrf in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.1.0), your application is affected.

Note: The npm ls tiny-csrf command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-319: Cleartext Transmission of Sensitive Information, where the product transmits sensitive or security-critical data in cleartext in a communication channel that can be sniffed by unauthorized actors. In Tiny csrf, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### Impact Weak encryption on CSRF so tokens can be read by malicious attackers. ### Patches Problems have been patched as of v1.1.0 ### Workarounds Upgrade to v1.1.0 ### References https://cheatsheetseries.owasp.org/cheatsheets/Cross-Site_Request_Forgery_Prevention_Cheat_Sheet.html ### For more information Submit an issue at [the github repo](https://github.com/valexandersaulys/tiny-csrf)

CVE-2022-39287 Affected Tiny csrf Versions

1 component(s)
Fixed Versions:
1.1.0
Product / Package Ecosystem Affected Versions Fixed Version
tiny-csrf
npm
< 1.1.0
1.1.0

References

Frequently Asked Questions

What is CVE-2022-39287?
CVE-2022-39287 is a security vulnerability in Tiny csrf involving tiny-csrf has openly visible CSRF tokens under CWE-319: Cleartext Transmission of Sensitive Information.
Which Tiny csrf versions are affected?
Affected versions include releases prior to 1.1.0 across affected packages: tiny-csrf.
What version fixes CVE-2022-39287?
Upgrading to 1.1.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is tiny-csrf affected?
Yes, tiny-csrf is affected in releases prior to 1.1.0. Upgrade your dependency to 1.1.0 or later.
What is the CVSS score of CVE-2022-39287?
CVE-2022-39287 has a CVSS v3.1 base score of 8.1 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N.
What CWE is associated with CVE-2022-39287?
CVE-2022-39287 is classified under CWE-319: Cleartext Transmission of Sensitive Information (The product transmits sensitive or security-critical data in cleartext in a communication channel that can be sniffed by unauthorized actors.).
How can I check npm dependencies for CVE-2022-39287?
Run the dependency tree command: 'npm ls tiny-csrf'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-pj2c-h76w-vv6f",
  "modified" : "2022-10-07T21:23:18Z",
  "published" : "2022-10-07T21:23:18Z",
  "aliases" : [ "CVE-2022-39287" ],
  "summary" : "tiny-csrf has openly visible CSRF tokens",
  "details" : "### Impact\n\nWeak encryption on CSRF so tokens can be read by malicious attackers. \n\n### Patches\n\nProblems have been patched as of v1.1.0\n\n### Workarounds\n\nUpgrade to v1.1.0\n\n### References\n\nhttps://cheatsheetseries.owasp.org/cheatsheets/Cross-Site_Request_Forgery_Prevention_Cheat_Sheet.html \n\n### For more information\n\nSubmit an issue at [the github repo](https://github.com/valexandersaulys/tiny-csrf)",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "tiny-csrf"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.1.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/valexandersaulys/tiny-csrf/security/advisories/GHSA-pj2c-h76w-vv6f"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2022-39287"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/valexandersaulys/tiny-csrf/commit/8eead6da3b56e290512bbe8d20c2c5df3be317ba"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/valexandersaulys/tiny-csrf"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-319" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2022-10-07T21:23:18Z",
    "nvd_published_at" : "2022-10-07T20:15:00Z"
  }
}