Summary
An arbitrary file overwrite vulnerability in MaruNuri LLC v2.0.23 allows attackers to use the file import process to replace internal application or system files.
When exploited, this can enable arbitrary code execution or unintended exposure of sensitive data, especially if critical configuration or executable files are overwritten.
Affected context
This vulnerability occurs in the file import functionality of MaruNuri LLC v2.0.23, where uploaded or imported files are written into the server's filesystem without sufficient restrictions on target paths or filenames.
It becomes risky in deployments where:
- The import feature is exposed to untrusted or semi-trusted users
- The application runs with permissions that can write into sensitive directories or overwrite important configuration, script, or executable files
- File paths are derived from user-controlled values or unvalidated metadata from the imported content
The issue is particularly severe when the application account has write access to directories used for code, configuration, or security-sensitive data.
Exploit preconditions
- Attack surface: Network-accessible file import endpoint or UI exposed to users or integrated systems.
- Required access: Ability to authenticate or otherwise access the file import feature (in some configurations this may be available to low-privileged or external users).
- Trigger point: Submission of a specially crafted import payload whose metadata or filename causes the application to write the file to a sensitive path.
- Why exploitation is possible: The application does not strictly constrain, normalize, or validate the destination path of imported files, allowing user-influenced values to determine where in the filesystem data is written. As a result, critical internal files can be overwritten.
Why this happens
The underlying issue falls under CWE-73: External Control of File Name or Path.
The file import logic allows external input (such as filenames, relative paths, or path components from the import payload) to influence where files are written on the server without enforcing strict, fixed directories or safe name transformations.
This pattern often manifests as:
- Trusting client-provided filenames or paths directly when constructing filesystem paths
- Failing to normalize and validate paths against an allowed directory
- Running the application with broad filesystem write permissions
In this design, imported content is effectively given the power to select the destination file, which turns a benign import mechanism into a primitive for overwriting internal resources.
Potential impact
- Overwriting application configuration files, which may allow:
- Enabling insecure modes
- Redirecting connections to attacker-controlled services
- Overwriting code files, templates, or scripts, which can:
- Lead to arbitrary code execution on subsequent requests or application restarts
- Overwriting authentication- or authorization-related files (where applicable), which could:
- Bypass access controls
- Disable logging or security checks
- Overwriting data files, resulting in:
- Corruption or loss of critical business data
- Injection of malicious or falsified records
- Overwriting temporary or log files to:
- Hide traces of other attacks
- Mislead monitoring and incident response
- Exposure or inference of sensitive information if overwritten files are later returned or rendered back to users.
General mitigation guidance
Effective mitigation focuses on constraining file write behavior and reducing the privileges of the process performing imports.
Common defensive patterns include:
- Fixed upload directories: Always write imported files into a predetermined, application-controlled directory, never directly honoring user-supplied paths.
- Strict filename validation: Sanitize and normalize filenames, rejecting any that contain path traversal sequences, absolute paths, or special device names; map filenames to generated identifiers rather than storing raw user-supplied names.
- Path canonicalization and enforcement: Canonicalize the resulting filesystem path and enforce that it resides within a single, known-safe directory tree.
- Least-privilege file permissions: Run the application under an account that has write access only to dedicated import/storage directories, not to code, configuration, or system paths.
- Segregated storage and content handling: Store imported content in data-only locations and avoid loading or executing it as code or configuration.
- Defense-in-depth checks: Add server-side validation rules and policies that reject suspicious imports (e.g., unexpected file types, unusually named files).
How teams detect issues like this
Detection typically combines code-level analysis with runtime monitoring:
- Static analysis: Search for file-write operations where paths are derived from request data, import metadata, or other user-controlled sources without normalization and directory enforcement.
- Code review signals: Flag patterns where:
- Raw filenames from uploads are concatenated to directory paths
- User input is passed into file open/write APIs without validation
- The application writes into shared or system directories from user-driven features
- Configuration and privilege review: Inspect deployment configurations to ensure the application user cannot write to code, configuration, or system directories.
- Runtime monitoring: Watch for unexpected file modifications in application, configuration, or system directories, especially correlated with file import activities or suspicious user behavior.
- Automated tooling: Use application security testing tools and SAST/DAST solutions to identify unbounded file writing patterns and path manipulation flows.

