In ONNX before 1.21.0, the 'saveexternaldata' function builds the external-data file path from the model's externaldata location field and opens it for writing without 'ONOFOLLOW/OEXCL', after a non-atomic 'os.path.isfile()' check. A local attacker with write access to the directory where a victim serializes external data can deterministically pre-plant a symlink that is being followed, causing the victim's write to append to any file the victim can write, e.g. ~/.ssh/authorizedkeys, cron files, or application configs. Fixed in 1.21.0.
{
"binaries": [
{
"binary_name": "libonnx-testdata",
"binary_version": "1.7.0+dfsg-3ubuntu2"
},
{
"binary_name": "libonnx1",
"binary_version": "1.7.0+dfsg-3ubuntu2"
},
{
"binary_name": "libonnxifi",
"binary_version": "1.7.0+dfsg-3ubuntu2"
},
{
"binary_name": "python3-onnx",
"binary_version": "1.7.0+dfsg-3ubuntu2"
}
]
}