Yes, it is possible to use a UMDF driver to intercept and redirect data between two USB CDC COM ports. The driver would need to create two virtual COM ports, one for the source device and one for the target device. The driver would then read the data from the source COM port and redirect it to the target COM port.
There are several examples of how to create a virtual COM port using UMDF, such as the Microsoft WinUSB Sample on GitHub. This sample demonstrates how to create a virtual COM port and communicate with a USB device using the WinUSB driver.
Once you have created the virtual COM ports, you can use standard serial communication APIs in your application to read and write data to the virtual COM ports, just as you would with a physical COM port.