CVE-2021-43788
JavaScript vulnerability analysis and mitigation

Overview

CVE-2021-43788 is a path traversal vulnerability discovered in NodeBB, an open-source Node.js based forum software. The vulnerability was present in versions prior to v1.18.5, allowing users to access JSON files outside of the expected languages/ directory. The issue was discovered and reported on October 25, 2021, and was patched with the release of version 1.18.5 on October 27, 2021 (GitHub Advisory, SonarSource).

Technical details

The vulnerability existed in the translation functionality of NodeBB. The application uses translation tags in templates that reference messages stored in JSON files. When resolving a file corresponding to a tag's namespace, the Languages.get function used path.join() without properly validating that the resulting path was within the translation directory. This path traversal vulnerability could be exploited through the og:url meta tag generation, where URL paths were not properly sanitized, allowing attackers to include translation tags that could access files outside the intended directory (SonarSource).

Impact

The vulnerability allowed attackers to read any JSON file from the file system, provided it contained valid JSON data. This could be exploited to access sensitive information such as database credentials or session secrets used for cookie verification. The vulnerability received a CVSS v3.1 Base Score of 5.0 (Medium) (NVD).

Mitigation and workarounds

The vulnerability was patched in NodeBB version 1.18.5 by implementing proper path validation. The fix includes checking if the resulting file path starts with the expected languages directory using pathToLanguageFile.startsWith(languagesPath). Users are advised to upgrade to version 1.18.5 or later. As a temporary workaround, users can cherry-pick commit c8b2fc46dc698db687379106b3f01c71b80f495f if a full upgrade is not immediately possible (GitHub Advisory).

Community reactions

The NodeBB team responded quickly to the reported vulnerability, implementing and releasing patches within two days of the initial report. The researchers were awarded a $1,536 bounty for their findings. The security community praised the quick response and thorough fix implemented by the NodeBB team (SonarSource).

Additional resources


SourceThis report was generated using AI

Related JavaScript vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-23947CRITICAL9.3
  • JavaScriptJavaScript
  • @orval/core
NoYesJan 20, 2026
CVE-2026-23950HIGH8.8
  • JavaScriptJavaScript
  • grafana-graphite
NoYesJan 20, 2026
CVE-2026-22037HIGH8.4
  • JavaScriptJavaScript
  • @fastify/express
NoYesJan 19, 2026
CVE-2026-23522LOW3.7
  • JavaScriptJavaScript
  • @lobehub/chat
NoNoJan 19, 2026
CVE-2025-66803LOW1.7
  • JavaScriptJavaScript
  • @hotwired/turbo
NoYesJan 20, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management