You can simply fiddle more of the string through the hole and let the ends stick out of the pegbox. Not visibly nice, but the strings are reusable on a longer scale double bass, in case you want to sell them later for whatever reason.
You can cut steel strings, BUT you need to leave some silk wound part (I would recommend two inches or five cm) at the top of the string but secure the silk with a drop of glue at the end (a few mm are enough). The silk fixes the metal windings and prevents unravelling which would make a string unusable. Better have only a silk wound part in the peg hole, not the blank string, but this should not be a problem to do. The hard bending at the hole might break the winding otherwise.
I have cut Spiro Weich 3/4 for my EUB because the pegs are small. Ends fixed with elastic glue, no problems since several years. But since they were the wrong tension, it would be a bit hard to sell them since they are shorter now and might not fit a double bass any longer.
So don't cut until you know you definitely want to keep them.