Advisories

MikroTik RouterOS Path Traversal via Container OCI/tar Image Extraction

Go Back
severity
medium
date
Affecting
  • RouterOS < 7.24.2

CWE
  • CWE-59 Improper Link Resolution Before File Access ('Link Following')
  • CWE-22 Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
CVSS
6.9
CVSS V4 Vector
CVSS:4.0/AV:N/AC:L/AT:P/PR:H/UI:P/VC:N/VI:H/VA:N/SC:N/SI:H/SA:L
Credit
Kazuma Matsumoto, a security researcher at GMO Cybersecurity by IERAE, Inc.
Description
MikroTik RouterOS before 7.24.2 contains a path traversal vulnerability in the container package OCI/tar image extraction that allows attackers to write files outside the container root by supplying a crafted container image with symlinks pointing to arbitrary paths. Attackers can exploit unsanitized tar member path extraction during container import via /container/add to achieve root-privileged file creation, directory creation, file deletion via overlayfs whiteout, and hardlink creation on the persistent data partition without ever starting the container. The 7.23.x long-term branch does not contain this fix; the container binaries in container-7.23.3.npk and container-7.23.4.npk are byte-identical, and there is no fixed long-term release at the time of publication.

Ready to get Started?

Explore VulnCheck, a next-generation Cyber Threat Intelligence platform, which provides exploit and vulnerability intelligence to help you prioritize and remediate vulnerabilities that matter.
  • Vulnerability Prioritization
    Prioritize vulnerabilities that matter based on the threat landscape and defer vulnerabilities that don't.
  • Early Warning System
    Real-time alerting of changes in the vulnerability landscape so that you can take action before the attacks start.