/

CVE-2026-110637

Severity:

HIGH RISK

(7.8)

OS Command Injection (CWE-78) in buildebooks CLI Tool

CVE-2026-110637

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

buildebooks before 0.2.2 contains an OS command injection vulnerability in its Kindle conversion workflow. When Kindle generation is enabled, a crafted EPUB filename, front-matter filename, or project folder name may be incorporated into a command executed with the privileges of the buildebooks process.

buildebooks before 0.2.2 contains an OS command injection vulnerability in its Kindle conversion workflow. When Kindle generation is enabled, a crafted EPUB filename, front-matter filename, or project folder name may be incorporated into a command executed with the privileges of the buildebooks process.

Affected context

The vulnerability occurs in the Kindle generation path implemented in lib/kindle.js, where project- or book-derived names are passed to the kindlegen utility through a shell command. Risk depends on an attacker being able to create or influence a book project, its metadata, or its containing directory while Kindle generation is enabled.

The vulnerability occurs in the Kindle generation path implemented in lib/kindle.js, where project- or book-derived names are passed to the kindlegen utility through a shell command. Risk depends on an attacker being able to create or influence a book project, its metadata, or its containing directory while Kindle generation is enabled.

Exploit preconditions

  • Attack surface: The buildebooks Kindle conversion workflow and its use of child_process.exec
  • Required access: Ability to supply or modify a book project, EPUB-related metadata, or the project directory name
  • Trigger point: Processing a project with kindle: true
  • Why exploitation is possible: Attacker-controlled naming data is incorporated into a shell command without sufficient separation from command syntax
  • Attack surface: The buildebooks Kindle conversion workflow and its use of child_process.exec
  • Required access: Ability to supply or modify a book project, EPUB-related metadata, or the project directory name
  • Trigger point: Processing a project with kindle: true
  • Why exploitation is possible: Attacker-controlled naming data is incorporated into a shell command without sufficient separation from command syntax

Why this happens

The underlying bug is command construction from untrusted filename or path components followed by execution through a shell-enabled process API. This behavior maps to CWE-78: Improper Neutralization of Special Elements used in an OS Command, because data intended as an argument can be interpreted as command syntax. The insecure pattern is passing externally influenced values to child_process.exec without robust argument handling, context-aware validation, or shell avoidance.

The underlying bug is command construction from untrusted filename or path components followed by execution through a shell-enabled process API. This behavior maps to CWE-78: Improper Neutralization of Special Elements used in an OS Command, because data intended as an argument can be interpreted as command syntax. The insecure pattern is passing externally influenced values to child_process.exec without robust argument handling, context-aware validation, or shell avoidance.

Potential impact

  • An attacker may execute arbitrary operating-system commands as the user running buildebooks
  • Local files, credentials, or build artifacts could be accessed or modified
  • The build environment could be used to tamper with generated books or downstream packages
  • Compromise could spread to other systems if the process has excessive permissions or access
  • An attacker may execute arbitrary operating-system commands as the user running buildebooks
  • Local files, credentials, or build artifacts could be accessed or modified
  • The build environment could be used to tamper with generated books or downstream packages
  • Compromise could spread to other systems if the process has excessive permissions or access

General mitigation guidance

Mitigation generally focuses on eliminating shell interpretation and reducing trust in project-controlled names.

Common defensive patterns include:

  • Prefer process-spawning APIs that pass executable arguments separately and do not invoke a shell
  • Apply strict, allowlisted validation to filenames, directory names, and metadata used by build commands
  • Treat project content and front matter as untrusted input even when supplied by internal workflows
  • Run conversion tasks with a dedicated low-privilege account, restricted filesystem access, and limited network permissions
  • Use isolated build environments and avoid exposing secrets to document-conversion processes
  • Preserve safe-by-default behavior when optional Kindle conversion is not explicitly required

Mitigation generally focuses on eliminating shell interpretation and reducing trust in project-controlled names.

Common defensive patterns include:

  • Prefer process-spawning APIs that pass executable arguments separately and do not invoke a shell
  • Apply strict, allowlisted validation to filenames, directory names, and metadata used by build commands
  • Treat project content and front matter as untrusted input even when supplied by internal workflows
  • Run conversion tasks with a dedicated low-privilege account, restricted filesystem access, and limited network permissions
  • Use isolated build environments and avoid exposing secrets to document-conversion processes
  • Preserve safe-by-default behavior when optional Kindle conversion is not explicitly required

How teams detect issues like this

Detection can include static analysis for child_process.exec or similar shell APIs receiving filename, path, metadata, or project-derived values. Code reviews should examine command construction, string concatenation, quoting assumptions, and whether a non-shell process API can be used instead.

Build policies may flag shell execution in document-processing code, require allowlisted path handling, and test representative untrusted names in isolated environments. Automated code review and software composition analysis tools can help identify these patterns, but findings should be validated against the actual execution path.

Detection can include static analysis for child_process.exec or similar shell APIs receiving filename, path, metadata, or project-derived values. Code reviews should examine command construction, string concatenation, quoting assumptions, and whether a non-shell process API can be used instead.

Build policies may flag shell execution in document-processing code, require allowlisted path handling, and test representative untrusted names in isolated environments. Automated code review and software composition analysis tools can help identify these patterns, but findings should be validated against the actual execution path.

Sources

SourceLink
github.comgithub.com/wastemobile/buildebooks
github.comgithub.com/wastemobile/buildebooks/blob/7fc313485447d9359fb38fda3cbc2ed60ce69fe7/lib/kindle.js#L5-L12
github.comgithub.com/wastemobile/buildebooks/commit/123776c9ef61e8075ada2f7da2f7046f6a8078d9
github.comgithub.com/wastemobile/buildebooks/pull/12
vulncheck.comvulncheck.com/advisories/buildebooks-before-0.2.2-os-command-injection-via-kindlegen-epub-file-name

Frequently asked

questions

Not inherently over the network. Exploitation generally requires a local user, service, repository, or workflow to accept and process a project containing attacker-influenced names, although an exposed build service could broaden the attack surface.

The attacker needs a way to create or modify a book project, relevant front matter, or the project directory name, and Kindle generation must process that project.

Avoid shell-based command construction and pass validated arguments through a process API that does not interpret input as shell syntax.

Treat filenames and metadata as untrusted, enforce allowlisted validation, use least-privilege build accounts, isolate conversion jobs, and review all external-process invocations for shell injection risks.

Not inherently over the network. Exploitation generally requires a local user, service, repository, or workflow to accept and process a project containing attacker-influenced names, although an exposed build service could broaden the attack surface.

The attacker needs a way to create or modify a book project, relevant front matter, or the project directory name, and Kindle generation must process that project.

Avoid shell-based command construction and pass validated arguments through a process API that does not interpret input as shell syntax.

Treat filenames and metadata as untrusted, enforce allowlisted validation, use least-privilege build accounts, isolate conversion jobs, and review all external-process invocations for shell injection risks.

Find out what's already
exploitable in your codebase.