Definitely a fungal problem in the soil. Probably fusarium from the looks of that stem, but there are other similar diseases, too.
You can look for cucumber varieties that are specifically mentioned as resistant to fusarium and other fungal disease and try those. Another technique (I haven't tried because it gets too hot to grow it where I am) is to companion plant celery with the cucumbers. Apparently the celery produces chemicals in its roots that help control some fungal diseases, including fusarium.