Mix all the ingredients for the pesto together in a small serving bowl and season with a little salt and plenty of pepper. Set aside.
Heat the oil in a large, heavy-based saucepan, add the onion and butternut squash and cook over a medium-high heat for 5–6 minutes until softened and golden in places. Add the coconut milk, curry paste and stock and bring to the boil, stirring constantly. Cover and simmer gently for 30 minutes until the squash is tender.
Transfer the soup in batches to a blender or food processor and blend until smooth. Return to the pan and reheat. Ladle into warmed serving bowls, spoon over a little of the pesto and swirl through with a skewer.