What is commonly called carbon fiber should actually be referred to as carbon fiber-reinforced plastic, or CFRP. It consists of carbon fibers in a matrix.
In the cycling industry, the matrix is usually made of thermoset resins, which consist of very large molecules with a very high degree of covalent bond cross linking. This structure is created during the curing process, which leaves the cured resin resistant to many chemical agents, including oils, soaps, fatty acids, and low concentration acids - basically main ingredients of modern greases.
The graphite itself is also rather non-reactive and will resist commercial-grade greases.
For completeness, one should also mention the interface between the fibers and the matrix, which is a mixture of hydrogen and covalent bonds. However, this interface is usually not exposed to the outside world due to the manufacturing process, and even if it was, it is still a tough barrier for most chemicals to traverse.
You can find compatibility charts for different types of CFRPs and resins, such as this one or this one.
That being said, manufacturers do suggest to use grease when interfacing metal and carbon (e.g. here), also to avoid galvanic corrosion. And honestly, I would be much more concerned with that than chemical reactivity of grease.