TryGhost / TryGhost/SDK

@tryghost/tpl uses deprecated lodash.template with unpatched CVE-2021-23337

Open
#730 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
134
Forks
87
Avg merge
12m
Merged PRs (30d)
25

Description

Summary

The @tryghost/tpl package depends on lodash.template@^4.5.0, which is deprecated and has an unpatched command injection vulnerability (CVE-2021-23337).

Affected Package Chain

gscan
  → @tryghost/validator
    → @tryghost/tpl@0.1.35 (latest)
      → lodash.template@4.5.0 (deprecated, no fix available)

Vulnerability Details

  • CVE: CVE-2021-23337
  • Severity: High
  • Type: Command Injection
  • Status: No patched version of lodash.template exists

Impact

Theme developers using gscan for validation receive Dependabot security alerts that cannot be resolved without upstream changes.

Suggested Fix

Consider migrating @tryghost/tpl to use an actively maintained templating library such as:

Workaround

Currently dismissing as "tolerable risk" since:

  • Only affects development dependencies
  • Template input is controlled (theme files, not user input)

Environment

  • gscan: 5.2.1
  • @tryghost/validator: 0.2.17
  • @tryghost/tpl: 0.1.35

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the @tryghost/tpl dependency declaration and reviewing how @tryghost/validator and gscan consume it. Compare the suggested replacement approaches and validate the affected packages; done means the dependency chain no longer includes lodash.template@4.5.0 and the CVE alert is resolved.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, nodejs
Domain
devtools, security
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.