The cut end of your zucchini (courgette) looks like it's exuding some water/sap that was previously in the fruit. The colour is due to the rest of the "stuff" in the sap besides water: e.g., perhaps sugars, starches and other stuff. As the water evaporates, it looks like what you show in the picture, which will also explain the beads of goo being stiff or tacky. That is common to occur with certain fruits, especially squashes, and especially at the stem-end, as you're showing in your picture. You can see the same thing happen when cutting the fruit cross-wise (across the fibers), and especially with freshly-picked specimens. I notice this especially with fresh butternut squash.
Unless it's soft, moldy, or otherwise showing signs of rotting, it's probably fine to eat. Cut the ugly bit(s) off and discard just before using... or otherwise the newly exposed flesh will exude more sap! It's probably got some temporary protective properties against fluid loss.
With fresh (summer) squashes, at room temperature, they'll start to get starchy and soft rather quickly. Putting them in the refrigerator (i.e., humidity/temperature control) can slow this process, but you've really only got a few days until the fruit starts going downhill quickly. So in this sense, it is "going bad" -- this process starts as soon as it's picked! Eat it up. With winter squashes, on the other hand, you've got much more time.