When the game rule doLimitedCrafting is enabled, a player can right-click on a campfire with a recipe ingredient for a campfire recipe, and have the campfire start cooking even though they do not have the recipe for it.
Potential solution:
When a player right-clicks a campfire when it is lit, it checks if any of the campfire recipes known by said player take the held item as an ingredient. If a recipe exists, the item is placed on the campfire. If there is no matching recipe, nothing happens.
When a campfire is lit from its unlit state, all items on it are dropped. (Currently, items remain on the campfire).
I can confirm this issue. I can replicate it in a vanilla world. Place a campfire, grab a raw food. Set DoLimitedCrafting to true, and run the command to clear all known recipes. You can still cook the item.
This same issue applies to the Stonecutter, and other similar workstations. (aside from the crafting table)