/

CVE-2026-110648

Severity:

HIGH RISK

(7.8)

OS Command Injection (CWE-78) in @offactory/compress-fonts

CVE-2026-110648

Deferred

Vulnerability type

Category:

OS Command Injection

CWE:

CWE-78

Impact:

Remote Code Execution

Severity:

HIGH RISK

(7.8)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

@offactory/compress-fonts contains an OS command injection flaw in its font-processing workflow. When a crafted font filename is incorporated into a FontForge command without shell-safe quoting, an attacker who can supply or influence font files may execute commands with the privileges of the Node.js process.

@offactory/compress-fonts contains an OS command injection flaw in its font-processing workflow. When a crafted font filename is incorporated into a FontForge command without shell-safe quoting, an attacker who can supply or influence font files may execute commands with the privileges of the Node.js process.

Affected context

The vulnerability occurs in deployments that use @offactory/compress-fonts to process font files and pass their paths to FontForge through a shell command. Risk increases when untrusted users, uploads, build inputs, or automated pipelines can introduce files whose names are later processed by the package.

The vulnerability occurs in deployments that use @offactory/compress-fonts to process font files and pass their paths to FontForge through a shell command. Risk increases when untrusted users, uploads, build inputs, or automated pipelines can introduce files whose names are later processed by the package.

Exploit preconditions

  • Attack surface: Font-processing functionality that invokes FontForge through a shell.
  • Required access: Ability to supply or influence a font file and its filename in the processing workflow.
  • Trigger point: Construction and execution of the FontForge command through Node.js child_process.execSync.
  • Why exploitation is possible: Font paths are interpolated without shell-safe quoting, allowing shell metacharacters in filenames to alter command interpretation.
  • Attack surface: Font-processing functionality that invokes FontForge through a shell.
  • Required access: Ability to supply or influence a font file and its filename in the processing workflow.
  • Trigger point: Construction and execution of the FontForge command through Node.js child_process.execSync.
  • Why exploitation is possible: Font paths are interpolated without shell-safe quoting, allowing shell metacharacters in filenames to alter command interpretation.

Why this happens

The underlying flaw is the construction of a shell command by concatenating or interpolating externally influenced file paths. Passing that command to a shell-enabled execution API allows filename data to be interpreted as shell syntax rather than as a literal argument. This maps to CWE-78: Improper Neutralization of Special Elements used in an OS Command, commonly known as OS command injection.

The underlying flaw is the construction of a shell command by concatenating or interpolating externally influenced file paths. Passing that command to a shell-enabled execution API allows filename data to be interpreted as shell syntax rather than as a literal argument. This maps to CWE-78: Improper Neutralization of Special Elements used in an OS Command, commonly known as OS command injection.

Potential impact

  • An attacker may execute arbitrary operating-system commands.
  • The Node.js process and its accessible files or credentials could be compromised.
  • Build, conversion, or processing environments could be altered.
  • Sensitive data may be exposed or modified.
  • Downstream systems could be affected if processed artifacts or pipeline credentials are trusted.
  • An attacker may execute arbitrary operating-system commands.
  • The Node.js process and its accessible files or credentials could be compromised.
  • Build, conversion, or processing environments could be altered.
  • Sensitive data may be exposed or modified.
  • Downstream systems could be affected if processed artifacts or pipeline credentials are trusted.

General mitigation guidance

Mitigation generally focuses on eliminating shell interpretation and reducing trust in file metadata.

Common defensive patterns include:

  • Prefer direct process-spawn APIs that pass arguments as an array without invoking a shell.
  • Treat filenames and paths as data, not command fragments, and apply platform-appropriate argument handling.
  • Validate filenames against an allowlist of expected characters and reject unexpected path components.
  • Isolate font conversion in a low-privilege process or container with restricted filesystem, network, and credential access.
  • Use controlled temporary directories and prevent access to sensitive host paths.
  • Keep dependency and artifact pipelines governed by provenance checks and controlled upload policies.

Mitigation generally focuses on eliminating shell interpretation and reducing trust in file metadata.

Common defensive patterns include:

  • Prefer direct process-spawn APIs that pass arguments as an array without invoking a shell.
  • Treat filenames and paths as data, not command fragments, and apply platform-appropriate argument handling.
  • Validate filenames against an allowlist of expected characters and reject unexpected path components.
  • Isolate font conversion in a low-privilege process or container with restricted filesystem, network, and credential access.
  • Use controlled temporary directories and prevent access to sensitive host paths.
  • Keep dependency and artifact pipelines governed by provenance checks and controlled upload policies.

How teams detect issues like this

Detection can combine source review, dependency analysis, and runtime monitoring:

  • Use static analysis rules to identify string interpolation or concatenation passed to execSync, shell execution, or comparable APIs.
  • Review code for external filenames flowing into command construction without argument-array handling or validation.
  • Enforce policies that prohibit shell invocation for file-processing operations unless explicitly justified.
  • Monitor process creation from font-processing workers and alert on unexpected child processes or command interpreters.
  • Add CI checks for command-injection patterns and automated dependency review; neutral automated review tools may help identify unsafe execution flows.

Detection can combine source review, dependency analysis, and runtime monitoring:

  • Use static analysis rules to identify string interpolation or concatenation passed to execSync, shell execution, or comparable APIs.
  • Review code for external filenames flowing into command construction without argument-array handling or validation.
  • Enforce policies that prohibit shell invocation for file-processing operations unless explicitly justified.
  • Monitor process creation from font-processing workers and alert on unexpected child processes or command interpreters.
  • Add CI checks for command-injection patterns and automated dependency review; neutral automated review tools may help identify unsafe execution flows.

Sources

SourceLink
github.comgithub.com/adamarcanov/compress-fonts/blob/7b07d20b3125a7bba8f933eeca21f5a09c8fb62a/index.js#L48
github.comgithub.com/adamarcanov/compress-fonts/commit/12002e5866af2163cd34424baae5a53338951a5d
github.comgithub.com/adamarcanov/compress-fonts/pull/1
vulncheck.comvulncheck.com/advisories/offactory-compress-fonts-before-1.1.1-os-command-injection-via-font-file-names

Frequently asked

questions

It can be exploited through a remote workflow when an attacker can upload or otherwise influence font files processed by an exposed service or pipeline. In local-only use, the attacker still needs a way to control the relevant input files.

The key requirement is the ability to supply or rename a font file so its path reaches the vulnerable command-construction logic. Authentication requirements depend on the application or pipeline that accepts the files.

Avoid shell interpretation by invoking FontForge through a direct process API with separately supplied arguments. Apply strict filename validation and limit the privileges of the processing worker.

Treat filenames as untrusted input, prohibit dynamic shell command construction, use static analysis and code-review policies for process execution, and isolate file-conversion workloads from sensitive resources.

It can be exploited through a remote workflow when an attacker can upload or otherwise influence font files processed by an exposed service or pipeline. In local-only use, the attacker still needs a way to control the relevant input files.

The key requirement is the ability to supply or rename a font file so its path reaches the vulnerable command-construction logic. Authentication requirements depend on the application or pipeline that accepts the files.

Avoid shell interpretation by invoking FontForge through a direct process API with separately supplied arguments. Apply strict filename validation and limit the privileges of the processing worker.

Treat filenames as untrusted input, prohibit dynamic shell command construction, use static analysis and code-review policies for process execution, and isolate file-conversion workloads from sensitive resources.

Find out what's already
exploitable in your codebase.