CVE-2018-25058: Twitter fetcher js Twitter-Post-Fetcher Vulnerable To Use Of Vulnerability

MODERATE
Advisory Identifier: GHSA-m688-cx2p-rgq9
CVSS 6.1
CWE-1022
Published
Advisory Summary

CVE-2018-25058 is a MODERATE (CVSS 6.1) twitter-post-fetcher vulnerable to use of vulnerability (CWE-1022: Use of Web Link to Untrusted Target with window.opener Access) affecting Twitter fetcher js libraries in the npm ecosystem. The issue involves twitter-post-fetcher vulnerable to use of web link to untrusted target with window.opener access. Remediation is available by upgrading affected packages to version 18.0.0.

CVE-2018-25058 at a Glance

CVE Identifier CVE-2018-25058
GHSA Identifier GHSA-m688-cx2p-rgq9
Severity MODERATE
CVSS v3.1 Base Score 6.1
CWE Classification CWE-1022: Use of Web Link to Untrusted Target with window.opener Access
Affected Product Twitter fetcher js
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 6.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:C/C:L/I:L/A:N).

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

How to Fix CVE-2018-25058

To remediate this vulnerability, upgrade all affected Twitter fetcher 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.

twitter-fetcher-js fixed: 18.0.0
npm install twitter-fetcher-js@18.0.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 twitter-fetcher-js

How to Check if You Are Affected

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

npm ls twitter-fetcher-js

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

Note: The npm ls twitter-fetcher-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-1022: Use of Web Link to Untrusted Target with window.opener Access, where the web application produces links to untrusted external sites outside of its sphere of control, but it does not properly prevent the external site from modifying security-critical properties of the window.opener object, such as the location property. In Twitter fetcher 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

A vulnerability classified as problematic has been found in Twitter-Post-Fetcher up to 17.x. This affects an unknown part of the file `js/twitterFetcher.js` of the component Link Target Handler. The manipulation leads to use of web link to untrusted target with window.opener access. It is possible to initiate the attack remotely. Upgrading to version 18.0.0 can address this issue. The name of the patch is 7d281c6fb5acbc29a2cad295262c1f0c19ca56f3. It is recommended to upgrade the affected component. The identifier VDB-217017 was assigned to this vulnerability.

CVE-2018-25058 Affected Twitter fetcher js Versions

1 component(s)
Fixed Versions:
18.0.0
Product / Package Ecosystem Affected Versions Fixed Version
twitter-fetcher-js
npm
< 18.0.0
18.0.0

References

Frequently Asked Questions

What is CVE-2018-25058?
CVE-2018-25058 is a security vulnerability in Twitter fetcher js involving Twitter-Post-Fetcher vulnerable to Use of Web Link to Untrusted Target with window.opener Access under CWE-1022: Use of Web Link to Untrusted Target with window.opener Access.
Which Twitter fetcher js versions are affected?
Affected versions include releases prior to 18.0.0 across affected packages: twitter-fetcher-js.
What version fixes CVE-2018-25058?
Upgrading to 18.0.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is twitter-fetcher-js affected?
Yes, twitter-fetcher-js is affected in releases prior to 18.0.0. Upgrade your dependency to 18.0.0 or later.
What is the CVSS score of CVE-2018-25058?
CVE-2018-25058 has a CVSS v3.1 base score of 6.1 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N.
What CWE is associated with CVE-2018-25058?
CVE-2018-25058 is classified under CWE-1022: Use of Web Link to Untrusted Target with window.opener Access (The web application produces links to untrusted external sites outside of its sphere of control, but it does not properly prevent the external site from modifying security-critical properties of the window.opener object, such as the location property.).
How can I check npm dependencies for CVE-2018-25058?
Run the dependency tree command: 'npm ls twitter-fetcher-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-m688-cx2p-rgq9",
  "modified" : "2023-01-09T21:50:29Z",
  "published" : "2022-12-29T09:30:19Z",
  "aliases" : [ "CVE-2018-25058" ],
  "summary" : "Twitter-Post-Fetcher vulnerable to Use of Web Link to Untrusted Target with window.opener Access",
  "details" : "A vulnerability classified as problematic has been found in Twitter-Post-Fetcher up to 17.x. This affects an unknown part of the file `js/twitterFetcher.js` of the component Link Target Handler. The manipulation leads to use of web link to untrusted target with window.opener access. It is possible to initiate the attack remotely. Upgrading to version 18.0.0 can address this issue. The name of the patch is 7d281c6fb5acbc29a2cad295262c1f0c19ca56f3. It is recommended to upgrade the affected component. The identifier VDB-217017 was assigned to this vulnerability.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "twitter-fetcher-js"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "18.0.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2018-25058"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/jasonmayes/Twitter-Post-Fetcher/pull/170"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/jasonmayes/Twitter-Post-Fetcher/commit/7d281c6fb5acbc29a2cad295262c1f0c19ca56f3"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/jasonmayes/Twitter-Post-Fetcher"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/jasonmayes/Twitter-Post-Fetcher/releases/tag/18.0.0"
  }, {
    "type" : "WEB",
    "url" : "https://vuldb.com/?ctiid.217017"
  }, {
    "type" : "WEB",
    "url" : "https://vuldb.com/?id.217017"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-1022" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2023-01-09T21:50:29Z",
    "nvd_published_at" : "2022-12-29T08:15:00Z"
  }
}