From fb221afa258c8dd2c4ac95b1996c33ef9db3f477 Mon Sep 17 00:00:00 2001 From: Hayden <64056131+hay-kot@users.noreply.github.com> Date: Fri, 4 Sep 2026 14:54:55 -0500 Subject: [PATCH] fix: harden server-initiated HTTP against SSRF and DNS rebinding (#7914) Co-authored-by: Michael Genson Co-authored-by: Claude Opus 5 --- .../installation/backend-config.md | 2 + ...26-09-04_1_outbound-request-protection.vue | 88 +++++++ .../security/providers/openid_provider.py | 124 ++++++---- mealie/core/settings/settings.py | 17 ++ mealie/pkgs/safehttp/__init__.py | 12 +- mealie/pkgs/safehttp/fetch.py | 6 + mealie/pkgs/safehttp/transport.py | 208 +++++++++++++--- .../controller_group_recipe_actions.py | 8 +- .../services/event_bus_service/publisher.py | 12 +- .../test_group_recipe_actions.py | 6 +- .../test_group_webhooks.py | 6 +- .../providers/test_openid_provider.py | 198 ++++++++------- tests/unit_tests/pkgs/safehttp/test_fetch.py | 42 ++++ .../pkgs/safehttp/test_transport.py | 225 ++++++++++++++++++ 14 files changed, 769 insertions(+), 185 deletions(-) create mode 100644 frontend/app/components/Domain/Announcement/Announcements/2026-09-04_1_outbound-request-protection.vue create mode 100644 tests/unit_tests/pkgs/safehttp/test_transport.py diff --git a/docs/docs/documentation/getting-started/installation/backend-config.md b/docs/docs/documentation/getting-started/installation/backend-config.md index 00b579c2c..268d78daa 100644 --- a/docs/docs/documentation/getting-started/installation/backend-config.md +++ b/docs/docs/documentation/getting-started/installation/backend-config.md @@ -30,6 +30,8 @@ | SECURITY_MAX_LOGIN_ATTEMPTS | 5 | Maximum times a user can provide an invalid password before their account is locked | | SECURITY_USER_LOCKOUT_TIME | 24 | Time in hours for how long a users account is locked | | ALLOWED_IFRAME_HOSTS | `""` | Comma-separated extra hostnames allowed as `