Heat oil in a large pot or dutch oven over medium-high heat. Add onions and one tsp of salt. Cook until onion softens, about 5 minutes. Stir in ginger, turmeric and cayenne and cook a minute more.
Add mashed squash and stir to coat it in the spiced oil. Stir in coconut milk and remaining salt.
Carefully transfer mixture to blender and blend on high speed until smooth, about 30 seconds (Important: work in two batches or use an immersion blender instead if your blender doesn't have heat vents for hot foods, or the lid might blow off from the steam.)