Vulnerabilities in pkg:npm/tesseract.js

PACKAGE
Advisory Summary

GHSA-83rx-c8cr-6j8q is a MODERATE (CVSS 5.9) insecure default configuration vulnerability (CWE-829: Inclusion of Functionality from Untrusted Control Sphere) affecting Tesseract.js libraries in the npm ecosystem. The issue involves insecure default configuration in tesseract.js. Remediation is available by upgrading affected packages to version 1.0.19.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:npm/tesseract.js

1 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:npm/tesseract.js. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-83rx-c8cr-6j8q - MODERATE Insecure Default Configuration in tesseract.js

GHSA-83rx-c8cr-6j8q at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-83rx-c8cr-6j8q
Severity MODERATE
CVSS v3.1 Base Score 5.9
CWE Classification CWE-829: Inclusion of Functionality from Untrusted Control Sphere
Affected Product Tesseract.js
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 5.9

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

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

How to Fix GHSA-83rx-c8cr-6j8q

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

tesseract.js fixed: 1.0.19
npm install tesseract.js@1.0.19
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 tesseract.js

How to Check if You Are Affected

To determine whether your Node.js application is affected by GHSA-83rx-c8cr-6j8q, inspect your project dependencies using npm:

npm ls tesseract.js

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

Note: The npm ls tesseract.js 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-829: Inclusion of Functionality from Untrusted Control Sphere, where the product imports, requires, or includes executable functionality (such as a library) from a source that is outside of the intended control sphere. In Tesseract.js, 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

Versions of `tesseract.js` prior to 1.0.19 default to using a third-party proxy. Requests may be proxied through `crossorigin.me` which clearly states is not suitable for production use. This may lead to instability and privacy violations. ## Recommendation Upgrade to version 1.0.19 or later.

GHSA-83rx-c8cr-6j8q Affected Tesseract.js Versions

1 component(s)
Fixed Versions:
1.0.19
Product / Package Ecosystem Affected Versions Fixed Version
tesseract.js
npm
< 1.0.19
1.0.19

References

Frequently Asked Questions

What is GHSA-83rx-c8cr-6j8q?
GHSA-83rx-c8cr-6j8q is a security vulnerability in Tesseract.js involving Insecure Default Configuration in tesseract.js under CWE-829: Inclusion of Functionality from Untrusted Control Sphere.
Which Tesseract.js versions are affected?
Affected versions include releases prior to 1.0.19 across affected packages: tesseract.js.
What version fixes GHSA-83rx-c8cr-6j8q?
Upgrading to 1.0.19 (or the latest patched release for your respective branch) resolves the vulnerability.
Is tesseract.js affected?
Yes, tesseract.js is affected in releases prior to 1.0.19. Upgrade your dependency to 1.0.19 or later.
What is the CVSS score of GHSA-83rx-c8cr-6j8q?
GHSA-83rx-c8cr-6j8q has a CVSS v3.1 base score of 5.9 (MODERATE) with vector string CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N.
What CWE is associated with GHSA-83rx-c8cr-6j8q?
GHSA-83rx-c8cr-6j8q is classified under CWE-829: Inclusion of Functionality from Untrusted Control Sphere (The product imports, requires, or includes executable functionality (such as a library) from a source that is outside of the intended control sphere.).
How can I check npm dependencies for GHSA-83rx-c8cr-6j8q?
Run the dependency tree command: 'npm ls tesseract.js'. 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-83rx-c8cr-6j8q",
  "modified" : "2021-08-04T21:33:58Z",
  "published" : "2019-06-05T20:48:55Z",
  "aliases" : [ ],
  "summary" : "Insecure Default Configuration in tesseract.js",
  "details" : "Versions of `tesseract.js` prior to 1.0.19 default to using a third-party proxy.  Requests may be proxied through `crossorigin.me` which clearly states is not suitable for production use. This may lead to instability and privacy violations.\n\n\n## Recommendation\n\nUpgrade to version 1.0.19 or later.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "tesseract.js"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.0.19"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/naptha/tesseract.js/pull/267"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/naptha/tesseract.js/commit/679eba055f2a4271558e86beec3d1b70cae3fb28"
  }, {
    "type" : "WEB",
    "url" : "https://snyk.io/vuln/SNYK-JS-TESSERACTJS-174085"
  }, {
    "type" : "WEB",
    "url" : "https://www.npmjs.com/advisories/792"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-829" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2019-06-05T20:48:43Z",
    "nvd_published_at" : null
  }
}