SSRF vulnerability in ComputerCraft/CC: Tweaked #1513
SquidDev
started this conversation in
Announcements
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
As you may nave noticed, we've recently published a security vulnerability in ComputerCraft/CC: Tweaked. That advisory contains all technical details, but I felt it was worth posting a more user-friendly description here too:
Summary
Many popular cloud providers offer an metadata services API endpoint, which can be queried by a host machine. These metadata APIs are not blocked by CC: Tweaked's default configuration, meaning that a Minecraft server running on such a cloud provider may expose sensitive information to players, potentially allowing them to pivot or privilege escalate into the hosting provider.
Many thanks to @JLLeitschuh for finding and reporting this.
Impact
This can allow a player on a server, using a CC: Tweaked computer, to retrieve sensitive information like:
Scope
This affects all versions of ComputerCraft and CC: Tweaked since ComputerCraft 1.11. To be vulnerable, the server operator must be:
Running their Minecraft server on a cloud provider which offers a metadata endpoint. This includes:
Other cloud providers may also be affected. Please check with their documentation or support to see if they expose an unauthenticated metadata service.
Have the HTTP API enabled.
http_enable
option inconfig/computercraft.cfg
.http.enabled
option in<save folder>/serverconfigs/computercraft-server.toml
.Be using a HTTP configuration which is not whitelist-only.
A quick test to see if your ComputerCraft version and its configuration is vulnerable is to do the following:
lua
program.If this prints
true
or an error, you are most likely vulnerable. If this printsfalse
, then things are probably fine, but it is still recommended you apply the following mitigations.Mitigations
The recommended mitigation is to update to the latest version of CC: Tweaked. Updates are available for the following versions:
If an update is not available for your version of Minecraft, it is recommended to update your config:
http_enable=false
inconfig/computercraft.cfg
).blocked_domains
config to match the following:http.enabled = false
in<save folder>/serverconfigs/computercraft-server.toml
).After applying one of the above mitigations, please follow the steps in "Scope" to confirm that the vulnerability is patched.
Timeline
Further reading
These links provide a little more information about SSRFs and exploits against cloud provider metadata services.
Footnotes
Some cloud providers expose their metadata endpoint under the 169.254.0.0/16 address range, which is blocked since CC: Tweaked 1.95.0. ↩ ↩2 ↩3 ↩4
Beta Was this translation helpful? Give feedback.
All reactions