This is an automated email from the git hooks/post-receive script.

Git pushed a commit to branch master
in repository ffmpeg.

commit 820da6158f72e8d68b6f0f856b24cf54b77ec709
Author:     Michael Niedermayer <[email protected]>
AuthorDate: Thu Sep 17 22:10:19 2026 +0200
Commit:     michaelni <[email protected]>
CommitDate: Sat Sep 19 18:53:13 2026 +0000

    avformat/http: ignore response cookies whose Domain does not cover the host
    
    Fixes: cookie injection for foreign domains
    Fixes: u2ys08MO8oEF
    Found during triage/review of the security report
---
 libavformat/http.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/libavformat/http.c b/libavformat/http.c
index 9088fc5af9..686aa6b7b2 100644
--- a/libavformat/http.c
+++ b/libavformat/http.c
@@ -1174,7 +1174,13 @@ static int parse_cookie(HTTPContext *s, const char *p, 
const char *host,
             }
         }
     }
-    int host_only = host && !cookie_domain(new_params);
+    const char *domain = host ? cookie_domain(new_params) : NULL;
+    int host_only = host && !domain;
+    if (domain && !host_in_cookie_domain(host, domain)) {
+        av_log(s, AV_LOG_WARNING, "Ignoring cookie for domain %s set by %s\n", 
domain, host);
+        av_dict_free(&new_params);
+        return 0;
+    }
     av_dict_free(&new_params);
 
     // duplicate the cookie name (dict will dupe the value)

-- 
To stop receiving notification emails like this one, please contact
[email protected].
_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to