-
-
Notifications
You must be signed in to change notification settings - Fork 448
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Command injection via wordexp call. #368
Comments
@oliverchang Thanks! In Line 1266 in 0fa56e2
wordexp is used to expand file path(i.e, expand environment variable, expand tilde(~ ) when a file path contains such symbol).
But according to glTF spec https://registry.khronos.org/glTF/specs/2.0/glTF-2.0.html#uris , Related: #337 |
Thank you very much for the amazingly fast fix @syoyo ! Would it be possible to create a security advisory (and CVE) for this via https://github.com/syoyo/tinygltf/security/advisories so downstream users are notified? We (Google) can also help with this if you prefer. |
@oliverchang Oh, I didn't know Github has a |
Hi @syoyo, have you had a chance to try generating an advisory for this issue? It's a crucial part of making sure users of this library are notified of vulnerabilities (and that they need to update). |
FYI we've requested CVE-2022-3008 for this vulnerability: https://nvd.nist.gov/vuln/detail/CVE-2022-3008 |
The use of wordexp(3) permits arbitrary code execution from manually-crafted glTF files. See syoyo/tinygltf#368 for more details. In practice this shouldn't be an issue for Blender since the GlTF data isn't manually crafted but from the OpenXR runtime (a bit like a driver). But updating the library to include the fix is not a big deal anyway. Note that the warning that required the local modification is no longer present upstream since syoyo/tinygltf@0bfcb4f Pull Request: https://projects.blender.org/blender/blender/pulls/105536
Describe the issue
This is a security vulnerability. The
wordexp
call here allows arbitrary code executiontinygltf/tiny_gltf.h
Line 2640 in 0fa56e2
To Reproduce
Expected behaviour
The
echo iamhere > poc
command should not be executed and thepoc
file is not created in the CWD.Additional context
This was found by OSS-Fuzz: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=49053
One potential fix here is to pass
WRDE_NOCMD
towordexp
per https://man7.org/linux/man-pages/man3/wordexp.3.htmlThe text was updated successfully, but these errors were encountered: