CVE-2021-32662 TechDocs mkdocs.yml path traversal

Medium 6.5 Published Updated

Attackers with source code access can read sensitive files via path traversal in mkdocs.yml configuration, exposing data through the TechDocs API.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2021-32662?

CVE-2021-32662 is a medium-severity path traversal vulnerability in Linuxfoundation Backstage, published on 3 Jun 2021. Any signed-in user can exploit it over the network, with no action from the victim.

Official description

Backstage is an open platform for building developer portals, and techdocs-common contains common functionalities for Backstage's TechDocs. In `@backstage/techdocs-common` versions prior to 0.6.3, a malicious actor could read sensitive files from the environment where TechDocs documentation is built and published by setting a particular path for `docs_dir` in `mkdocs.yml`. These files would then be available over the TechDocs backend API. This vulnerability is mitigated by the fact that an attacker would need access to modify the `mkdocs.yml` in the documentation source code, and would also need access to the TechDocs backend API. The vulnerability is patched in the `0.6.3` release of `@backstage/techdocs-common`.

Weakness: CWE-22

Which versions are affected by CVE-2021-32662?

2 open source packages ship an affected version, including @backstage/techdocs-common. It affects 1 product.

PackageAffectedFixed in
@backstage/techdocs-common npmAll versions0.6.3
@backstage/techdocs-common npmAll versions0.6.3

Products include Linuxfoundation Backstage.

How do I fix CVE-2021-32662?

Upgrade @backstage/techdocs-common to 0.6.3 or later.

Upgrade, and resolve every user-supplied path against an allowed base folder before opening it. More about Path traversal.

Is CVE-2021-32662 being exploited?

There is no known exploitation of CVE-2021-32662 in the wild and no public exploit code.

All Linuxfoundation Backstage vulnerabilities

Sources

Also known as GHSA-pgf8-28gg-vpr6.

Is CVE-2021-32662 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free