# CVE-2021-43821: Files Accessible to External Parties in Opencast

> Attackers with media upload privileges can access local files on the host machine via URL references, potentially exposing sensitive secrets.

- **Severity:** Critical 9.9 (`CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 14 Dec 2021
- **Updated:** 4 Aug 2024
- **Also known as:** GHSA-59g4-hpg3-3gcp

## What is CVE-2021-43821?

CVE-2021-43821 is a critical path traversal vulnerability in opencast, published on 14 Dec 2021. Any signed-in user can exploit it over the network, with no action from the victim.

### Official description

Opencast is an Open Source Lecture Capture & Video Management for Education. Opencast before version 9.10 or 10.6 allows references to local file URLs in ingested media packages, allowing attackers to include local files from Opencast's host machines and making them available via the web interface. Before Opencast 9.10 and 10.6, Opencast would open and include local files during ingests. Attackers could exploit this to include most local files the process has read access to, extracting secrets from the host machine. An attacker would need to have the privileges required to add new media to exploit this. But these are often widely given. The issue has been fixed in Opencast 10.6 and 11.0. You can mitigate this issue by narrowing down the read access Opencast has to files on the file system using UNIX permissions or mandatory access control systems like SELinux. This cannot prevent access to files Opencast needs to read though and we highly recommend updating.

Weakness: CWE-552 (Files or Directories Accessible to External Parties)

## Which versions are affected by CVE-2021-43821?

2 open source packages ship an affected version, including org.opencastproject:opencast-ingest-service-impl. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `org.opencastproject:opencast-ingest-service-impl` | Maven | All versions | 10.6 |
| `org.opencastproject:opencast-ingest-service-impl` | Maven | All versions | 10.6 |

Products: Apereo Opencast.

## How do I fix CVE-2021-43821?

Upgrade org.opencastproject:opencast-ingest-service-impl to 10.6 or later.

## Is CVE-2021-43821 being exploited?

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

Public exploit code:

- opencast cve-2021-43821敏感信息泄露漏洞环境 (github_poc): https://github.com/Jackey0/opencast-CVE-2021-43821-env

## Other vulnerabilities in opencast

- [CVE-2020-5206](https://insights.sbomify.com/CVE-2020-5206/): Authentication Bypass For Endpoints With Anonymous Access in OpenCast (high 8.7)
- [CVE-2021-32623](https://insights.sbomify.com/CVE-2021-32623/): Opencast vulnerable to billion laughs attack (XML bomb) (high 8.1)
- [CVE-2020-5229](https://insights.sbomify.com/CVE-2020-5229/): Opencast stores passwords using outdated MD5 hash algorithm (high 7.7)
- [CVE-2020-5230](https://insights.sbomify.com/CVE-2020-5230/): Opencast uses unsafe identifiers (high 7.7)
- [CVE-2020-5228](https://insights.sbomify.com/CVE-2020-5228/): Opencast allows unauthorized public access via OAI-PMH (high 7.6)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2021-43821 and fix it if it is affected.

What it is: CVE-2021-43821 is a critical path traversal vulnerability in opencast, published on 14 Dec 2021. Any signed-in user can exploit it over the network, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2021-43821 in the wild and no public exploit code.

Affected packages and fixed versions:
- org.opencastproject:opencast-ingest-service-impl (Maven): affected all versions; fixed in 10.6
- org.opencastproject:opencast-ingest-service-impl (Maven): affected all versions; fixed in 10.6

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2021-43821/ (Markdown: https://insights.sbomify.com/CVE-2021-43821/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2021-43821
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2021-43821
- OSV: https://osv.dev/vulnerability/CVE-2021-43821

---
From sbomify Insights: https://insights.sbomify.com/CVE-2021-43821/
Summaries are generated and may contain mistakes; the official description above is the record.
