# CVE-2023-52081: ewen-lbh/ffcss late-Unicode normalization vulnerability

> Attackers can bypass input validation in ffcss using Unicode normalization to inject restricted characters, potentially affecting theme lookup logic.

- **Severity:** Medium 5.3 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 28 Dec 2023
- **Updated:** 2 Aug 2024
- **Also known as:** GHSA-wpmx-564x-h2mh, GO-2023-2426

## What is CVE-2023-52081?

CVE-2023-52081 is a medium-severity vulnerability in ewen-lbh ffcss, published on 28 Dec 2023. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

ffcss is a CLI interface to apply and configure Firefox CSS themes. Prior to 0.2.0, the function `lookupPreprocess()` is meant to apply some transformations to a string by disabling characters in the regex `[-_ .]`. However, due to the use of late Unicode normalization of type NFKD, it is possible to bypass that validation and re-introduce all the characters in the regex `[-_ .]`. The `lookupPreprocess()` can be easily bypassed with equivalent Unicode characters like U+FE4D (﹍), which would result in the omitted U+005F (_), for instance. The `lookupPreprocess()` function is only ever used to search for themes loosely (case insensitively, while ignoring dashes, underscores and dots), so the actual security impact is classified as low. This vulnerability is fixed in 0.2.0. There are no known workarounds.

Weakness: CWE-74 (Improper Neutralization of Special Elements in Output Used by a Downstream Component), CWE-176 (Improper Handling of Unicode Encoding)

## Which versions are affected by CVE-2023-52081?

3 open source packages ship an affected version, including github.com/ewen-lbh/ffcss. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `github.com/ewen-lbh/ffcss` | Go | All versions | 0.2.0 |
| `github.com/ewen-lbh/ffcss` | Go | All versions | 0.2.0 |
| `github.com/ewen-lbh/ffcss` | Go | All versions | 0.2.0 |

Products: Ewen-Lbh Firefox Css.

## How do I fix CVE-2023-52081?

Upgrade github.com/ewen-lbh/ffcss to 0.2.0 or later.

## Is CVE-2023-52081 being exploited?

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

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2023-52081 and fix it if it is affected.

What it is: CVE-2023-52081 is a medium-severity vulnerability in ewen-lbh ffcss, published on 28 Dec 2023. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2023-52081 in the wild and no public exploit code.

Affected packages and fixed versions:
- github.com/ewen-lbh/ffcss (Go): affected all versions; fixed in 0.2.0
- github.com/ewen-lbh/ffcss (Go): affected all versions; fixed in 0.2.0
- github.com/ewen-lbh/ffcss (Go): affected all versions; fixed in 0.2.0

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-2023-52081/ (Markdown: https://insights.sbomify.com/CVE-2023-52081/index.md)
```

## Sources

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

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