I recently got 2 SN74HC14N from a local shop, they look quite legitimate with the TI logo on them, but when tested they both exhibit undesired self oscillation (~150MHz) close to threshold:

It seems to me that the switching level isn't exactly the same when increasing the voltage versus when lowering it and could indicate that they are in fact legitimate 74HC14 hysteresis, but maybe I am wrong.
If I am not mistaken the purpose of using a 74HC14 instead of a 74HC04 is precisely to allow smooth transitions, and I was planning on using them as oscillators, which is currently impossible because of this issue. I have included the schematics and a picture of the breadboard which was used for the test.
All unused inputs are tied to ground. A 100nF X7R is near the chip VCC.
At some point I tried adding a 22uF electrolytic, replacing the breadboard with another one, buffering the output of the potentiometer with a LM358, different values for the decoupling cap (10nF, 1nF, 100pF, 10pF) all without success.


simulate this circuit – Schematic created using CircuitLab
Here are some pictures of the beginning of the oscillation, the last one includes the +5V rail in blue:




EDIT:
Several people suggested connecting pins 7 and 14 directly to the 100 nF capacitor, which was actually the first configuration I had tried. I decided to revisit it to make sure, but unfortunately it didn't make any difference.
Another suggestion was to connect all unused inputs to pin 7 using the shortest possible traces, so I updated the layout accordingly. That didn't resolve the issue either.
At that stage, the board looked like this:

Since I wasn't entirely sure I remembered the results of buffering the input voltage correctly, and because it was also suggested that the trimpot value might be causing issues for the 74HC14 input, I decided to try buffering the signal with the LM358 again.
This time, it did improve the situation: the instability on the positive-going threshold disappeared, although the negative-going threshold was still very unstable.
Here is the corresponding breadboard setup and the measurements:


I also decided to try the 10nF capacitor separately (without buffering) and it did have pretty much the same effect (clean on the positive-going threshold, still messy on the negative going threshold):


Then I tried combining both and it finally seems to work.




