sidebar hamburger menu

Lodash

Endless Lifecycle Support (ELS) for Lodash from TuxCare provides security fixes for Lodash versions that have reached their end of life. This allows you to continue running Lodash applications without vulnerability concerns, even after official support has ended.

Supported Lodash Versions

  • Lodash 4.5.0, 4.17.x

Connection to ELS for Lodash Library

This guide outlines the steps needed to integrate the TuxCare ELS for the Lodash library.

Step 1: Get Token

You need a token in order to use TuxCare ELS Lodash library. Anonymous access is disabled. To receive the token, please contact sales@tuxcare.com.

Step 2: Set Up ELS for Lodash

TuxCare provides ELS for Lodash as an NPM package, hosted on a secure internal registry. Follow the steps below to add it to your project and get started.

  1. Navigate to the root directory of your Lodash project.

  2. Create a .npmrc file or update it if it already exists.

    Example:

    my-lodash-project/
    ├── node_modules/
    ├── package.json
    ├── .npmrc         ⚠️ ← Create it here
    └── package-lock.json
    
  3. Use an editor of your choice (e.g., VS Code) to add the following registry address line:

    registry=https://registry.npmjs.org/
    @els-js:registry=https://nexus.repo.tuxcare.com/repository/els_js/
    //nexus.repo.tuxcare.com/repository/els_js/:_auth=${TOKEN}
    

    Replace ${TOKEN} with the token you received from sales@tuxcare.com.

  4. Update your package.json file to replace your Lodash dependencies with the TuxCare packages. You can do this in two ways:

    • Option 1: TuxCare Patcher (Automated)

      Install the Patcher globally and run it. The TuxCare Patcher automatically detects the Lodash version in your package.json and updates your dependencies and overrides to use the corresponding TuxCare @els-js/* packages.

      npm install -g @els-js/tuxcare-patcher --userconfig ./.npmrc
      tuxcare-patch-js
      

      The patcher will update your package.json, for example, from:

      "dependencies": {
        "lodash": "^4.17.19"
      }
      

      to:

      "dependencies": {
        "lodash": "npm:@els-js/lodash@4.17.19-tuxcare.2"
      },
      "overrides": {
        "lodash@4.17.19": "npm:@els-js/lodash@4.17.19-tuxcare.2"
      }
      
    • Option 2: Manual Update

      Manually update your package.json file by replacing your Lodash dependencies with the TuxCare packages. This method gives you full control over which packages to update.

      Choose Lodash version:
      "dependencies": {
        "lodash": "npm:@els-js/lodash@4.5.0-tuxcare.2"
      }
      
  5. You need to remove the node_modules directory and the package-lock.json file, and also clear the npm cache before installing the patched packages. Use the following commands:

    rm -rf node_modules package-lock.json && npm cache clean --force
    
  6. Run the following command to install the ELS version of the Lodash library (token for the TuxCare repository will be automatically picked up from your .npmrc file):

    npm install
    

    You will see an output like:

    added 1 package, and audited 2 packages in 787ms
    
    found 0 vulnerabilities
    
  7. You've successfully installed the Tuxcare ELS version of the Lodash library into your project.

Vulnerability Exploitability eXchange (VEX)

VEX is a machine-readable format that tells you if a known vulnerability and is actually exploitable in your product. It reduces false positives, helps prioritize real risks.

TuxCare provides VEX for Lodash ELS versions: security.tuxcare.com/vex/cyclonedx/els_lang_javascript/lodash/.

How to Upgrade to a Newer Version of TuxCare Packages

If you have already installed a package with a tuxcare.1 suffix and want to upgrade to a newer release (for example, tuxcare.3), you can use one of the following methods:

  • Option 1: TuxCare Patcher (Automated). Recommended for projects with multiple TuxCare dependencies.

    The TuxCare Patcher automatically detects all TuxCare dependencies in your package.json and updates them to the latest available versions.

    tuxcare-patch-js --upgrade
    
  • Option 2: Manual Update via CLI (Single Dependency)

    If you want to update a single TuxCare dependency, use the npm install command with the specific version. This automatically updates both package.json and package-lock.json:

    npm install lodash@npm:@els-js/lodash@4.5.0-tuxcare.2
    
  • Option 3: Manual Update via package.json (Multiple Dependencies)

    If you want to update several TuxCare dependencies, manually update the version strings in your package.json, then remove installed files and clear npm cache to avoid conflicts:

    rm -rf node_modules package-lock.json && npm cache clean --force
    npm install
    

Resolved CVEs

Fixes for the following vulnerabilities are available in ELS for Lodash from TuxCare versions:

Choose Lodash version:
CVE IDCVE TypeSeverityAffected LibrariesVulnerable Versions
CVE-2021-23337DirectHighLodash< 4.17.20

If you are interested in the TuxCare Endless Lifecycle Support, contact sales@tuxcare.com.

×
Need help?
I'm a multilingual AI chatbot, trained to answer all your questions!