To cut both ways

First, thanks to all who helped with the previous inquiry - very helpful community!

The latest mystery is "to cut both ways". I know what the expression means, but any ideas as to its origin? Google's not yielding too much information.

--Dave

My understanding is this. A two-edged sword cuts both ways, thus giving us the synonymous idioms "that's a two-edged sword" and "that cuts both ways".