Is curl trying to write to a write-protected sandboxed location?
curl(3204) deny(1) system-privilege 10006
This clearly shows that the sandbox is killing curl.
The error code when matched to the XNU source here
#define PRIV_NET_PRIVILEGED_NECP_MATCH 10006 /* Privilege verified by Network Extension policies */
There is also a related thread with someone facing the same error code as you, perhaps this may help:
List of system privileges
Topic:
App & System Services
SubTopic:
Core OS
Tags: