CVE-2023-52081
JSON

5.3medium

ewen-lbh/ffcss late-Unicode normalization vulnerability

Severity
5.3medium CVSS:3.1 by GitHub_M
Exploit likelihood
0.62% (higher than 44% of CVEs)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-wpmx-564x-h2mhGO-2023-2426

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.

Affected

Product or packageVersionsReported by
ewen-lbh ffcss< 0.2.0CVE List
github.com/ewen-lbh/ffcss (Go)before 0.2.0GitHub Advisory Database, Go Vulnerability Database
ewen-lbh firefox_cssbefore 0.2.0NVD

All scores

GitHub_M5.3medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N
GitHub5.3medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N
NVD5.3medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N

Classification

What each source says

CVE List

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.

GitHub Advisory Database
Summary

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 [-_ .].

// lookupPreprocess applies transformations to s so that it can be compared
// to search for something.
// For example, it is used by (ThemeStore).Lookup
func lookupPreprocess(s string) string {
	return strings.ToLower(norm.NFKD.String(regexp.MustCompile(`[-_ .]`).ReplaceAllString(s, "")))
}

Take the following equivalent Unicode character U+2024 (․). Initially, the lookupPreprocess() function would compile the regex and replace the regular dot (.). However, the U+2024 (․) would bypass the ReplaceAllString(). When the normalization operation is applied to U+2024 (․), the resulting character will be U+002E (.). Thus, the dot was reintroduced back.

Impact

The lookupPreprocess() can be easily bypassed with equivalent Unicode characters like U+FE4D (﹍), which would result in the omitted U+005F (_), for instance. It should be noted here that the variable s is user-controlled data coming from /cmd/ffcss/commands.go#L22-L28 the command args. 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.

Remediation

A simple fix would be to initially perform the Unicode normalization and then the rest of validations.

References
Go Vulnerability Database

ewen-lbh/ffcss Late-Unicode normalization vulnerability in github.com/ewen-lbh/ffcss

NVD (es)

ffcss es una interfaz CLI para aplicar y configurar temas CSS de Firefox. Antes de 0.2.0, la función `lookupPreprocess()` estaba destinada a aplicar algunas transformaciones a una cadena deshabilitando caracteres en la expresión regular `[-_ .]`. Sin embargo, debido al uso de la normalización Unicode tardía del tipo NFKD, es posible omitir esa validación y volver a introducir todos los caracteres en la expresión regular `[-_ .]`. El `lookupPreprocess()` se puede omitir fácilmente con caracteres Unicode equivalentes como U+FE4D (?), lo que daría como resultado U+005F (_) omitido, por ejemplo. La función `lookupPreprocess()` sólo se utiliza para buscar temas de forma flexible (sin distinguir entre mayúsculas y minúsculas, ignorando guiones, guiones bajos y puntos), por lo que el impacto real en la seguridad se clasifica como bajo. Esta vulnerabilidad se solucionó en 0.2.0. No se conocen workarounds.

References

Sources

SourceRecordLicence
CVE ListCVE-2023-52081 changed 2024-08-02CVE Terms of Use
GitHub Advisory DatabaseGHSA-wpmx-564x-h2mh changed 2026-09-10CC-BY-4.0
Go Vulnerability DatabaseGO-2023-2426 changed 2026-03-03CC-BY-4.0
NVDCVE-2023-52081 changed 2026-06-17Public domain