My employers have generally been fine giving me blanket permission to contribute to specific open source projects. The framing matters: don't say "can I please do some charity work because it makes me feel good". Say, "can I have your permission to get free rigorous review from experts in my field, and zero out all future maintenance costs for your company by contributing my fixes to the upstream open source project?…
Luck with your employer also plays a big part in how you approach this too.