/

CVE-2026-57863

Severity:

HIGH RISK

(8.8)

Path Traversal (CWE-22) in Crater Invoice Updater API

CVE-2026-57863

Deferred

Vulnerability type

Category:

Path Traversal

CWE:

CWE-22

Impact:

Arbitrary File Write and Potential Remote Code Execution

Severity:

HIGH RISK

(8.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

Crater Invoice through version 6.0.6 contains a path traversal vulnerability in its authenticated self-update API. A company owner who can submit a crafted ZIP archive may write files outside the intended extraction directory, potentially placing PHP code in a web-accessible location and achieving remote code execution.

Affected context

The issue occurs in Crater Invoice deployments that expose the self-update functionality and use the affected ZIP extraction flow. It becomes risky when an authenticated company owner can provide or influence an update archive and the application extracts archive entry names without constraining them to the intended destination directory. Impact also depends on the web server being able to serve or execute files written by the application.

Exploit preconditions

  • Attack surface: Authenticated self-update API and ZIP archive extraction
  • Required access: Authenticated company-owner privileges or equivalent access to the update function
  • Trigger point: Processing of a supplied archive by the ZIP extraction routine
  • Why exploitation is possible: Archive entry names containing parent-directory traversal sequences are accepted without sufficient canonicalization and containment checks
  • Additional condition for code execution: The destination must be web-accessible and the server must interpret an uploaded or extracted PHP file as executable code

Why this happens

The underlying bug is improper handling of file paths extracted from an untrusted archive. ZIP entry names are passed to a generic extraction routine without reliably normalizing the resulting path and verifying that it remains within the approved extraction directory. This behavior maps to CWE-22: Improper Limitation of a Pathname to a Restricted Directory. When the application permits attacker-controlled archive paths to escape the intended directory, arbitrary files may be overwritten or created.

Potential impact

  • An attacker may write arbitrary files outside the intended update directory.
  • Sensitive application files could be overwritten or corrupted.
  • Malicious PHP files could be placed in a web-accessible directory.
  • The attacker could achieve remote code execution under the web server's privileges.
  • Application data, credentials, or connected services could be exposed or altered.

General mitigation guidance

Mitigation generally focuses on treating archive contents as untrusted and

enforcing destination containment before writing files.

Common defensive patterns include:

  • Normalize each archive entry path and reject absolute paths, parent-directory traversal, and ambiguous path encodings.
  • Verify that every resolved extraction path remains beneath a dedicated, non-public extraction directory.
  • Prefer secure archive-extraction libraries or APIs that enforce path confinement by default.
  • Keep update staging directories separate from the web root and prevent execution of uploaded or extracted scripts.
  • Apply least-privilege permissions to the application and web server processes.
  • Restrict self-update operations to trusted administrators and require integrity verification for update packages.
  • Use a fixed allowlist of permitted archive paths and file types where practical.

How teams detect issues like this

Organizations can look for this weakness through:

  • Static analysis rules identifying archive extraction calls that use attacker-controlled entry names without canonicalization.
  • Code review checks for missing containment validation after path normalization.
  • Tests using archive entries with parent-directory segments, absolute paths, alternate separators, and encoded traversal forms.
  • Runtime monitoring for file creation outside approved update directories.
  • Web server and application logs showing unusual self-update requests or newly created PHP files in public directories.
  • Policy enforcement that blocks executable scripts in upload, cache, and update-staging locations.

Automated security review tools may help identify unsafe archive extraction patterns, but findings should be validated against the application's filesystem and deployment configuration.

Sources

SourceLink
gist.github.comgist.github.com/sermikr0/cc58727e6a777b6ea1104e923803a0ba
vulncheck.comvulncheck.com/advisories/crater-invoice-path-traversal-rce-via-update-unzip-endpoint

Frequently asked

questions

Exploitation generally requires authenticated company-owner access to the

self-update API or another capability that permits supplying an update archive.

The resulting impact depends on the permissions of the application process.

No. Code execution typically requires that a written PHP file reaches a

web-accessible location and that the server is configured to execute it.

Arbitrary file creation or overwriting may still be possible without those

conditions.

Treat every archive entry name as untrusted, normalize it, and verify that its

resolved path remains within a dedicated non-public extraction directory before

writing it. Avoid allowing extracted content to execute as server-side code.

Use secure-by-default archive extraction, enforce update-package integrity and

administrator authorization, isolate update staging from the web root, and

continuously test path containment and file-type policies in CI and runtime

monitoring.

Find out what's already
exploitable in your codebase.