If you issue cookies to www.example.com your browser will not send them to cdn.example.com unless it's very poorly written.
Each cookie has a path set to it and browsers will obey it, this includes inter-domain paths and restrictions.
If you want you can go even further and assign a cookie to a specific URI path so the cookie will only be issues to pages that fall under www.example.com/private/ for example if that's what the path is set too.
Each cookie has a path set to it and browsers will obey it, this includes inter-domain paths and restrictions. If you want you can go even further and assign a cookie to a specific URI path so the cookie will only be issues to pages that fall under www.example.com/private/ for example if that's what the path is set too.