-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Server-Side Template Injection in webhooks, export templates and custom links. #6921
Comments
This is a pretty well-known issue with Jinja2 other templating engines in general. We could add some form of additional warning, I guess, though it may be difficult to succinctly convey the relative risk. Given that only authenticated users who have been specifically granted access can create these objects in the first place, it's probably not a huge concern. The sandbox is a neat idea, but we'll need to dig into it more to see if there are any blockers. |
By the way, you shouldn't be running NetBox as a member of the |
It's not a production system, it's a completely clean run of netbox-docker. I also run docker with user namespaces, so it doesn't even map to the root group on the host. Anyway, not sure why they change the user and not the group in the compose file. |
Let's open an issue on the netbox-docker to discuss the user/group assignments/mappings when running netbox in a container Edit: not the first permission related issue in netbox-docker. Check this enhancement: netbox-community/netbox-docker#546 |
I've updated the |
NetBox version
v.2.11.10
Python version
3.8
Steps to Reproduce
{{ ''.__class__.__mro__[1].__subclasses__()[199]('id', shell=True,stdout=-1).communicate()}}
intemplate code
. Indexes for mro and subclasses will probably differ per instance.Expected Behavior
Error or default csv file generated
Observed Behavior
.csv file contains
(b'uid=101 gid=0(root)\n', None)
Suggestions
I see two immediate options.
With option 2 there should probably still be a note in the documentation, as sandboxes are rarely known to be perfect.
The text was updated successfully, but these errors were encountered: