Atomic Serverに認証済みユーザーが任意のファイルを読み取れる脆弱性
Summary
認証済みのエージェントが、内部IDに細工した値を指定することで、サーバープロセスが読み取れるファイルを外部から読み取れる脆弱性です。サーバーの設定を読まれると、ルートエージェントの秘密鍵が漏れ、データの読み取り・書き換え・削除が可能になるおそれがあります。0.30.0から0.40.3までが影響を受け、0.40.3で修正されています。0.40.3以降へ速やかに更新してください。
AI summary
Produced by SecPulse using an external AI model; it may contain mistakes. Check the original description and references below before acting on it.
認証済みのエージェントが、内部IDに細工した値を指定することで、サーバープロセスが読み取れるファイルを外部から読み取れる脆弱性です。サーバーの設定を読まれると、ルートエージェントの秘密鍵が漏れ、データの読み取り・書き換え・削除が可能になるおそれがあります。0.30.0から0.40.3までが影響を受け、0.40.3で修正されています。0.40.3以降へ速やかに更新してください。
Affected packages
| Package | Affected → Fixed | |
|---|---|---|
| ontolaatomic-server | — | Not listed |
| crates.ioatomic-server |
0.30.0 – 0.40.1→ Not listed |
Not listed |
This record does not list fixed versions. Check the article or the vendor advisory in the references for whether and where it is fixed.
Original description The description as published by the source.
Summary
The Commit apply path enforces no allowlist of writable properties, so any authenticated Agent can set the internalId string (datatype string, no character validation) on a resource it owns. The /download handler then uses that value verbatim as a filesystem path — file_path.push(internal_id); NamedFile::open(file_path) — with no sanitization and no containment check (server/src/handlers/download.rs:56-65). By setting internalId to a traversal path (../../../../etc/passwd) or an absolute path (PathBuf::push of an absolute path replaces the buffer), an attacker reads any file on the host. The highest-value target is the server config file storing the root agent private key, which yields full server compromise. Only the upload path sanitizes filenames (sanitize_filename); the download path trusts the stored value. The handler also never checks that the resource is a File.
Affected component
server/src/handlers/download.rs:56-65—file_path.push(internal_id)+NamedFile::open, no sanitization, noFile-class check.lib/src/commit.rs(apply_changes) — sets any property; no server-managed-property denylist.
Steps to Reproduce
Environment: joepmeneer/atomic-server:develop, http://localhost:9883. Attacker is any Agent with write on a parent (self-signup, or via the /setup issue reported separately).
- Create a resource and set
internalIdto a traversal path — sign the Commit andPOST /commit…
Source: CVE.org (CVE Program・cvelistV5) NVD GitHub Advisory
References
- advisory github.com
- advisory nvd.nist.gov
- package github.com
- web github.com
- web github.com
- web github.com