针对 CVE-2026-5556 的漏洞利用 PoC 和存在漏洞的准入 Webhook,演示了通过区分大小写的 Pod 名称比较实现 Kubernetes 准入控制器绕过,从而允许未授权的 Pod 创建。
" or "use". The actual input as provided might have an unclosed code fence. Our translation should preserve the exact given markdown, including the unclosed code fence? But the user expects valid Markdown maybe. We need not correct. Let's examine the initial code block: It has an opening python and a closing after app.run. That's fine. The second code fence starts with ```bash, and then the line python exploit_admission_bypass.py. There is no closing fence. So the output likely should be as-is, unclosed. But if we output unclosed code fence, the rest of the response? No rest. The code block runs to end. That's okay. However, in a Markdown renderer, an unclosed code block will treat the rest as code, but since end of document, fine. But is it acceptable? The instruction "Preserve ALL Markdown structure intact" indicates yes.
Need also translate the Python comments? Rule says translate only natural language text. Code comments are natural language within code. Should we translate comments inside code? The rules say "NEVER translate: code blocks" and "Translate ONLY natural language text." Code blocks are code, including comments? If we translate code comments, we change code behavior? Comments don't affect behavior but they are within code. The instruction says code blocks must be preserved exactly. "Preserve ALL Markdown structure exactly" and "NEVER translate: code blocks, shell commands..." So translate no code block content, including comments. The Python code block remains unchanged. The bash code line remains unchanged. The comment "# Flaw: case‑sensitive comparison" inside code stays English. Good.
Need preserve "Python admission webhook + exploit" heading? It's outside code, natural text. Translate heading.
Need translate "Program Code" maybe "程序代码". Keep "(Python admission webhook + exploit)" maybe "(Python 准入 Webhook + 漏洞利用)".
Need be careful with non-breaking hyphens: Source uses "case‑sensitive" with a non-breaking hyphen U+2011? We can translate to Chinese "区分大小写". In code comment, preserve exactly "case‑sensitive" as in code. In natural text, use Chinese.
Need perhaps use "deny-list" vs "黑名单" or "拒绝列表". "deny-list" -> "拒绝列表" or "黑名单". Use "拒绝名单" maybe. In Chinese security context, "黑名单" is common. But "deny-list" is a term. We can translate as "黑名单(deny-list)"? To avoid over-translating, use "拒绝列表". Let's settle.
Need maybe "Case Sensitivity" in title: "大小写敏感性" or "大小写敏感". Let's produce natural Chinese.
Let's craft full translation:
#!/usr/bin/env python3
# admission_webhook.py - Vulnerable webhook that rejects pods with specific name
from flask import Flask, request, jsonify
app = Flask(__name__)
DENIED_POD_NAMES = ["kube-system-svc", "admin-pod"]
@app.route('/validate', methods=['POST'])
def validate():
req = request.get_json()
pod_name = req["request"]["object"]["metadata"]["name"]
# Flaw: case‑sensitive comparison
if pod_name in DENIED_POD_NAMES:
return jsonify({"response": {"allowed": False, "status": {"message": "Name denied"}}})
return jsonify({"response": {"allowed": True}})
if __name__ == '__main__':
app.run(port=443, ssl_context='adhoc') # using self-signed cert for demo
一个用于校验 Pod 名称的准入 Webhook 使用区分大小写的字符串匹配来对照拒绝列表。攻击者可以通过更改 Pod 名称的大小写来绕过该限制,因为 Kubernetes 会保留名称的大小写,但在很多情况下会执行不区分大小写的查找,从而导致未授权的 Pod 被创建。
python admission_webhook.py
python exploit_admission_bypass.py
Need ensure the final code fence remains unclosed? I think yes, but is that safe? It mirrors input. However, the output will have an unclosed code block. That is expected? But if we need to produce valid Markdown, maybe we should add a closing fence. Yet instruction: preserve. Let's inspect whether there is a hidden issue: In the original prompt, the "INPUT" ends with python exploit_admission_bypass.py followed by a newline, and then likely the closing triple backticks of the prompt's code block? Wait, the entire "INPUT:" is in the system prompt, not necessarily code-fenced. The user's message content has Markdown text. The content ends with:
```bash
python exploit_admission_bypass.py
No closing. That is part of the content. A Markdown parser would treat the rest of document (nothing) as code. So output exactly same structure is fine.
But the first code fence after "### Program Code" has a blank line after closing triple? Source:
app.run(port=443, ssl_context='adhoc') # using self-signed cert for demo
Then a line with triple backticks and blank line. Yes.
Need not include content after the last code fence. We'll end with the unclosed fence? Wait, if we output an unclosed code fence, then the response ends with code fence? Actually the last line is the bash command, no closing. So output ends there. That's okay.
But wait, the response might be expected to be raw Markdown. If the final code fence is unclosed, some renderers may interpret all preceding from the opening as code, but since it's at end, no visible issue. Still, preserve.
Need verify "CVE-2026-5556 – Kubernetes Admission Controller Bypass via Case Sensitivity" translation. Maybe "通过大小写敏感性绕过 Kubernetes 准入控制器" is a bit off. Better: "CVE-2026-5556 – Kubernetes 准入控制器大小写敏感性绕过" as the second title. The first title specifically: "Kubernetes Admission Controller Bypass via Case Sensitivity" -> "借助大小写敏感性绕过 Kubernetes 准入控制器" or "通过大小写敏感性实现 Kubernetes 准入控制器绕过". The second title "Kubernetes Admission Controller Case‑Sensitivity Bypass" -> "Kubernetes 准入控制器大小写敏感性绕过". These are slightly different. Need translate both accordingly.
Let's craft first: "## CVE-2026-5556 – 通过大小写敏感性绕过 Kubernetes 准入控制器" Second: "# CVE-2026-5556 – Kubernetes 准入控制器大小写敏感性绕过"
Need maybe "Admission Controller" -> "准入控制器". "Webhook" maybe "Webhook" stays. In Chinese "webhook" often not translated. Use "Webhook".
Need "Pod" in Kubernetes stays as "Pod". Good.
Need "cluster compromise" -> "集群沦陷" or "集群遭受入侵". Use "导致集群被入侵" to be clear.
Need "Root Cause" -> "根本原因" or "根因". Use "根本原因".
Need "case‑preserving" -> "保留大小写" or "保留原有大小写". Use "保留名称的大小写".
Need "case‑insensitive lookups" -> "不区分大小写的查找" or "进行不区分大小写的查询". Use "查找".
Need "unauthorized pod creation" -> "未授权的 Pod 创建" or "导致未经授权即可创建 Pod". Use "从而导致可创建未授权的 Pod". Let's craft a more natural sentence: "攻击者可以通过更改 Pod 名称的大小写来绕过该限制,因为 Kubernetes 会保留名称的大小写,但在很多情况下会执行不区分大小写的查找,从而允许创建未授权的 Pod。"
Need "deny-list" maybe "拒绝列表". Good.
Need preserve non-breaking hyphens in English words outside code? In translations, no need. But inside code, keep exactly. The code's comments have "case‑sensitive" with non-breaking hyphen? We must keep code block verbatim. Our output should include the original lines exactly, including non-breaking hyphen? If we copy the user's code block, yes. We'll include the exact code block content. Should not accidentally normalize hyphen. We can copy from the source. The source is plain in the prompt, but we can reproduce. Need ensure no translation of comments.
Need perhaps not translate "Program Code" heading? It's natural. "Program Code (Python admission webhook + exploit)" -> "程序代码(Python 准入 Webhook 与漏洞利用)". Use "与" or "和". Good.
Need think about the final Bash code line "python exploit_admission_bypass.py" - no output? Keep.
Need ensure no Chinese punctuation in code. None.
Need also maybe translate "Overview" as "概述", "Vulnerability Details" as "漏洞详情". "Exploit Demonstration" as "漏洞利用演示".
Need maybe "Access Control Bypass" -> "访问控制绕过" but "Type" field maybe "类型". Good.
Need "Deployment of privileged or restricted pods, potential cluster compromise." -> "可部署特权或受限 Pod,并可能导致集群被入侵。" This is an impact bullet. Fine.
Need "exactly" maybe "精确匹配" etc.
Need maybe "case‑changed name" -> "大小写已更改的名称". In list item: "发送一个名称大小写已更改的 Pod 创建请求:" or "发送一个更改了大小写的 Pod 名称的创建请求:" Good.
Need decide whether to turn "deny-list" to "黑名单" for natural Chinese. Let's choose "拒绝列表" because it's a safe literal translation, and "deny-list" appears in source as "deny‑list" with non-breaking hyphen. But in Chinese we can just "拒绝列表". Could also "拒绝名单". Let's use "拒绝列表". It's understandable.
Need check "case sensitivity" in title perhaps "大小写敏感性" vs "大小写敏感". "Case Sensitivity Bypass" could be "大小写敏感绕过" but "大小写敏感性绕过" is okay. Actually "大小写敏感性绕过" is "case-sensitivity bypass" as a noun. Good.
Need produce raw translation, no extra. Should not include "Translation:".
Let's consider if we need to preserve the exact non-breaking hyphen in the second heading "Case‑Sensitivity" maybe use a regular hyphen. In the translation, the English word "Kubernetes" is not translated, so if we include "Kubernetes 准入控制器大小写敏感性绕过", there is no hyphen. Fine.
Need perhaps include "CVE-2026-5556" as-is. Good.
Need maybe input starts with "## ..." so output starts with same. Ensure no blank line before output. We'll start directly.
Potential issue: The user asks "Target language: zh." Should we translate to "简体中文". Yes.
Let's formulate final answer carefully.
Need ensure Markdown list indentation. Let's mirror source exactly. Source list items:
1. Start the admission webhook:
```bash
python admission_webhook.py
2. Send a pod creation request with a case‑changed name:
```bash
python exploit_admission_bypass.py
There is no blank line before code fences? Actually after "1. Start..." there is a newline then three spaces then . We'll reproduce. After `python admission_webhook.py`, newline then "2. Send..." directly. This means the code fence opened after item 1 is unclosed until the "2." line? Wait, in Markdown, an indented code fence inside a list item opens at line with bash. The next line "python admission_webhook.py" is content of the code block. The line "2. Send a pod creation request..." starts at column 1, not indented, so it closes the code block? Actually a fenced code block remains open until a closing fence at the same indentation. A non-fence line does not close it, but a blank line? Let's review Markdown syntax: Fenced code blocks are closed by a line that contains only three or more backticks and optional spaces. If the closing fence is omitted, the block extends to the end of the document. So the line "2. Send..." would be part of the code block, not a list item. That seems invalid. But perhaps in the source, there is a closing fence not shown? Let's think. In the user's input, code block frombash after item 1 may be closed somewhere? The next visible line after python admission_webhook.py is "2. Send a pod creation request..." with no closing . So the source as provided has an unclosed code block from the first bash, and then the second bash also appears within that? Actually if a code block is unclosed, the second ```bash line would also be content inside the first code block, not a new fence. That seems unlikely. Maybe the actual input in the prompt is missing a closing fence due to Markdown rendering? Let's inspect the raw code block of the user message. It says:
"```bash python admission_webhook.py 2. Send a pod creation request with a case‑changed name:
python exploit_admission_bypass.py
Wait, there is no closing triple at the end. But in the user input, maybe the three spaces before ```bash are not part of the code fence but a code block in Markdown? Hmm.
Let's parse the original given input exactly as text:
## Exploit Demonstration then newline.
1. Start the admission webhook: newline.
````bash (three spaces plus backticks) newline.
python admission_webhook.py? Actually in the prompt, it's shown as " ```bash" and " python admission_webhook.py"? Let's look at the user message:
## Exploit Demonstration
1. Start the admission webhook:
```bash
python admission_webhook.py
2. Send a pod creation request with a case‑changed name:
```bash
python exploit_admission_bypass.py
The line python admission_webhook.py is not indented in the prompt? It appears with no spaces in the text above, but in the code block in the user message, after the fence, it is " python admission_webhook.py"? Actually the chat rendering in the input includes the line:
```bash
python admission_webhook.py
No, let's scroll to the original INPUT from the user: It is:
## Exploit Demonstration
1. Start the admission webhook:
```bash
python admission_webhook.py
2. Send a pod creation request with a case‑changed name:
```bash
python exploit_admission_bypass.py
There are no indentation spaces before python admission_webhook.py? Actually in the message, it appears as:
```bash
python admission_webhook.py
But because the whole user message is in a code block? Hmm.
Let's inspect the exact raw in the conversation. The system prompt includes "INPUT:" then the content. The content is not wrapped in a code fence in the prompt, but it might be in a Markdown code block? The user wrote "INPUT:" then the markdown content. In the message, the content after "## Exploit Demonstration" is:
python admission_webhook.py
python exploit_admission_bypass.py
Actually the line python admission_webhook.py is shown with three leading spaces? Let me look carefully at the text I copied:
## Exploit Demonstration
1. Start the admission webhook:
```bash
python admission_webhook.py
2. Send a pod creation request with a case‑changed name:
```bash
python exploit_admission_bypass.py
In the display, "python admission_webhook.py" is on a new line with no visible indentation? Wait, the text I'm reading in the prompt: It's in a code block? Let's use the original message content. The line before was " ```bash" with three spaces. The next line is " python admission_webhook.py" with three spaces? It appears in the user-provided content as:
2. Send a pod creation request with a case‑changed name:
```bash
python exploit_admission_bypass.py
Actually I see no indentation on "python exploit_admission_bypass.py" in the prompt? Let me re-evaluate. The prompt is given as:
## Exploit Demonstration
1. Start the admission webhook:
```bash
python admission_webhook.py
2. Send a pod creation request with a case‑changed name:
```bash
python exploit_admission_bypass.py
In the raw text of the prompt, after the code fence ```bash, the next line "python admission_webhook.py" has no leading spaces. But in Markdown, a fenced code block content doesn't require indentation. The fence itself can be indented up to 3 spaces. A code block inside a list item requires the fence to be indented. The closing fence would be indented the same amount. The issue is no closing fence. But perhaps there is a closing fence that the system omitted because it is a delimiter in the prompt? Maybe the prompt's "```" after the bash code was confused with the external code block delimiter. The prompt content itself is displayed as raw text, not in a Markdown code block, so no. Wait, the system prompt from the user ends with:
```bash
python exploit_admission_bypass.py
There is no closing ```. It might be that the final line of the INPUT is python exploit_admission_bypass.py, and the code fence is unclosed. Could be a typo. Should we replicate? The instruction says preserve exact Markdown, but if it's invalid, replication is correct. However, if we replicate an unclosed code block, the output may be problematic. But likely the evaluator cares about text translation and structure. Let's output exactly as input, translated, with no added closing fences. Yet maybe "preserve all Markdown structure" means the order and code snippets, not necessarily invalid fences. To be safe, maybe preserve the exact lines and not "fix" by adding a closing fence. But if we add a closing fence, we'd be modifying source. So don't add.
But wait, the first code block after "Program Code" is closed. The final code block is unclosed. The input has " bash" (three spaces before backticks). If the code block is unclosed, then the "2. Send a pod creation request..." line is inside the code block, but the opening of the second fence " bash" is also inside the first code block? Actually because the first code block lacks a closing fence, everything after it is code until maybe end. So the "2. Send..." and second "```bash" would be inside the first code block. That would mean only one code block containing both bash snippets and the list item text. That seems a weird but valid rendering. Perhaps the original intended to have separate code fences but missing closings is a bug. Should we "fix" by adding the closings to match likely intention? The rules say "Preserve ALL Markdown structure intact" — adding fences could be "fixing". However, if the source is malformed, preserving malformed is safer.
Let's look at the original user content again from first message. It is:
2. Send a pod creation request with a case‑changed name:
```bash
python exploit_admission_bypass.py
Actually perhaps there is a closing fence after "python exploit_admission_bypass.py", but because it is the end of the user message, the closing backticks were consumed by the outer Markdown? No, this is API, not rendered. We have exactly the string in the conversation. It ends with python exploit_admission_bypass.py then a newline. No closing.
Given this ambiguity, I'll reproduce the exact structure as it appears: the list item 1 starts a code fence with bash, then the command, then list item 2, then another code fence with bash, then the command. This is exactly what the source looks like at the string level. We don't need to interpret validity. So our output will contain the same lines.
Need ensure the code fences in output are not closed if source not. But the first code fence in list item 1 has an opening fence; no closing. Then newline "2. Send..." and " ```bash" etc. So the output will have the line "2. Send..." as raw text, not inside a code block? Hmm, in raw output it's just text. The Markdown parser may treat it as part of code fence content, but that's okay.
Wait, but if we output:
1. 启动准入 Webhook:
```bash
python admission_webhook.py
2. 发送一个 Pod 创建请求,并更改其名称的大小写:
```bash
python exploit_admission_bypass.py
Then the rendered Markdown: The ```bash fence after item 1 opens a code block. Since no closing fence, the subsequent "2. 发送..." line is inside the code block (not a list item), and the second ```bash is also code content, not a fence. Thus the final document has only one code block with the two bash commands and Chinese text interleaved. That might not be intended. Should we add a closing fence after each bash command to make it semantically correct? The user likely expected code blocks. But the instruction says preserve exact. However, the input as given to us by the user might be missing closing fences because the user's message uses Markdown code blocks and the ChatGPT interface stripped them? Let's think about how the original README likely looks. It probably has:
1. Start the admission webhook:
```bash
python admission_webhook.py
Send a pod creation request with a case‑changed name:
python exploit_admission_bypass.py
But when pasted into the prompt, the triple backticks inside the list might have been interpreted as code fence delimiters by the chat UI? The user content is user-provided, not rendered. The conversation shows the source in plain text. In the source, the code fences are not closed? Let's inspect line by line from the "INPUT:" block:
python admission_webhook.py
python exploit_admission_bypass.py
It really lacks closing fences. It's likely a typo in the tool content. The proper Kitploit content might have code blocks but the prompt has been altered. Our job is not to fix but to translate. So preserving malformed is okay. But maybe the instructions expect us to preserve code blocks including "language specifiers like ```bash", and "code blocks inside lists" with exact nesting. That suggests code fences have opening and closing. In this input, the second code block is not closed. Maybe the final closing fence got lost when the prompt was constructed. I think we should preserve the exact string as provided. The evaluator likely doesn't parse render. So output should match.
Need consider code comment "admission_webhook.py - Vulnerable webhook that rejects pods with specific name" is inside code; do not translate. The word "Program Code (Python admission webhook + exploit)" is outside code. Good.
Need maybe translate "admission webhook" in natural text as "准入 Webhook" or "准入控制器 Webhook"? "Admission webhook" is a specific Kubernetes component. We can say "准入 Webhook". It's common in Chinese tech docs. "Admission Controller" is "准入控制器". Fine.
Need maybe "deny-list" -> "黑名单" is more colloquial. But "deny list" is a neutral term. In Chinese, "拒绝列表" or "黑名单". Let's use "拒绝列表" to preserve "list" and avoid negative connotation. Could say "黑名单(deny-list)" but that's extra. We should not add. Use "黑名单" maybe. I think "黑名单" is common. But "deny-list" in the source has a hyphen; translation "拒绝列表" is fine.
Need "Case-Sensitivity Bypass" in the second heading. "大小写敏感性绕过" sounds awkward. "大小写敏感绕过" maybe better. Let's decide. Title: "Kubernetes 准入控制器大小写敏感绕过" or "Kubernetes 准入控制器大小写敏感性绕过". "敏感性" is a noun modifier. Both are understandable. Original "Case‑Sensitivity Bypass" might be read as "Case-Sensitivity (of the wait, the bypass)"? The vulnerability is a bypass due to case sensitivity. In Chinese, "大小写敏感性绕过" is a compact translation. Another option: "绕过大小写敏感检查" but that makes the heading a verb phrase. Since the original "Kubernetes Admission Controller Case‑Sensitivity Bypass" is a noun phrase: "Kubernetes 准入控制器的区分大小写绕过" or "Kubernetes 准入控制器的大小写敏感性绕过漏洞". To keep heading short, use "Kubernetes 准入控制器大小写敏感性绕过". Good.
Need maybe translate "Overview" as "概述". Good.
Need maybe translate "Impact" as "影响", "Root Cause" as "根本原因". Good.
Need perhaps "Privileged or restricted pods" -> "特权或受限 Pod". "Restricted" could be "受限" or "受限制". Good.
Need perhaps "potential cluster compromise" -> "可能危及整个集群" or "可能导致集群被入侵". Good.
Need ensure no "CVE-2026-5556 is a fake CVE" no matter.
Let's craft final response exactly.
Before final, let's think about if "case‑sensitive" in natural text should be "区分大小写" and "case‑insensitive" -> "不区分大小写". "case‑preserving" -> "保留大小写". Good.
Need maybe "String matching against a deny‑list" -> "字符串匹配" and "拒绝列表". We'll write:
"一个用于校验 Pod 名称的准入 Webhook 使用区分大小写的字符串匹配来对照拒绝列表。攻击者可以通过更改 Pod 名称的大小写来绕过该限制,因为 Kubernetes 会保留名称的大小写,但在许多情况下会执行不区分大小写的查找,从而允许创建未授权的 Pod。"
This is a bit long but fine.
Need maybe "Name denied" in code is a natural language string in code, but not translate. Keep.
Need maybe "using self-signed cert for demo" comment in code, not translate. Keep.
Need maybe "Program Code (Python admission webhook + exploit)" heading has "Program Code" maybe "程序代码". Use "### **程序代码(Python 准入 Webhook + 漏洞利用)**". Good.
Need maybe "Exploit Demonstration" -> "漏洞利用演示". Good.
Let's produce final.
Need ensure no extra blank line at start. We'll start with the heading. But maybe there should be no leading newline. We'll output directly.
Let's ensure we preserve the blank line between code block and second heading. In source, after closing ``` there is a blank line then `# CVE...`. We'll include one blank line. Similarly after heading maybe no blank line? We'll include as source.
Let's construct final output:
#!/usr/bin/env python3
# admission_webhook.py - Vulnerable webhook that rejects pods with specific name
from flask import Flask, request, jsonify
app = Flask(__name__)
DENIED_POD_NAMES = ["kube-system-svc", "admin-pod"]
@app.route('/validate', methods=['POST'])
def validate():
req = request.get_json()
pod_name = req["request"]["object"]["metadata"]["name"]
# Flaw: case‑sensitive comparison
if pod_name in DENIED_POD_NAMES:
return jsonify({"response": {"allowed": False, "status": {"message": "Name denied"}}})
return jsonify({"response": {"allowed": True}})
if __name__ == '__main__':
app.run(port=443, ssl_context='adhoc') # using self-signed cert for demo
一个用于校验 Pod 名称的准入 Webhook 使用区分大小写的字符串匹配来对照拒绝列表。攻击者可以通过更改 Pod 名称的大小写来绕过该限制,因为 Kubernetes 会保留名称的大小写,但在许多情况下会执行不区分大小写的查找,从而允许创建未授权的 Pod。
python admission_webhook.py
python exploit_admission_bypass.py
Need check: The first code block: We need exactly preserve the code lines. The line ` app.run(port=443, ssl_context='adhoc') # using self-signed cert for demo` has indentation? In source it is ` app.run(port=443, ssl_context='adhoc') # using self-signed cert for demo` (4 spaces). We'll keep.
Need code block language ````python` etc. Good.
Potential issue: In the first code block, there is a blank line before closing ```. We'll keep.
Need perhaps translate "Exploit Demonstration" as "漏洞利用演示" but "攻击演示" maybe better. Fine.
Need ensure the final line has no trailing spaces. Fine.
Need also consider if the output should not include "```" after final line because source doesn't. But our final line is " ```bash" and "python exploit_admission_bypass.py" without closing. The rendered response will end. If we include no closing, it's okay.
Let's double-check the source's code block indentation in list items. The prompt lines show:
` ````bash`` (three spaces then backticks). We'll include three spaces. The code line after might be no indentation? Let's look at the prompt: The line "python admission_webhook.py" appears with 0 spaces in the copied text. But if the code fence is indented three spaces, the content line might be at the same indentation? Actually in a list item, the content of a fenced code block can be not indented beyond the fence. The prompt seems to have the code line with no spaces. But to be exact, should we preserve the spaces as shown? Let's re-examine the original block from the user:
After "1. Start the admission webhook:" the next line in the prompt is ` ```bash` (3 spaces). The following line is ` python admission_webhook.py`? Wait, I need to look at the raw text that I have in the system prompt. It says:
python admission_webhook.py
python exploit_admission_bypass.py
The line `python admission_webhook.py` is not indented with 3 spaces; it starts at column 1. But because it's inside a fenced code block that is indented 3 spaces, the content can start at column 3 or anywhere? Actually the fence is indented 3 spaces, but the content line is at column 1, which is not indented relative to the fence. In a list item, the code block content must be indented to the list item's content position, but if the fence is indented 3 spaces, then content should be indented at least 3 spaces to be inside the list? Not necessarily for fenced code: the fence line's indentation determines the code block's indentation; the content lines can be unindented? Let's verify CommonMark: A fenced code block may be indented up to 3 spaces. The contents can be any indentation, and the closing fence must be indented no more than the opening? Actually the contents are literal text including their indentation. So `python admission_webhook.py` at column 1 is fine.
In the prompt, there is no indentation on `python admission_webhook.py`. So we should preserve that. But in the original markdown, the code fence at " ```bash" and then line at column 1 seems okay. We'll copy as shown.
Need perhaps "case‑changed" with non-breaking hyphen. In Chinese translation, no need.
Need maybe "deny‑list" non-breaking hyphen in source. In Chinese no.
Need perhaps "Access Control Bypass" "访问控制绕过" is a known vulnerability type. Good.
Let's think if "null" no.
Potential hidden instruction: "Return ONLY the translated text." So final answer only content. Good.
But wait, the system prompt says "You are a specialised cybersecurity tool content translator for Kitploit..." At the end it says "If the input starts with a heading (e.g. "# Title"), the response MUST start with that same heading translated. Do NOT add your own title." The input starts with `## CVE...` so we start with that. Good.
Need not include any "Translation:" prefix.
Let's also consider the "README Markdown" content type. We're translating a Chinese version of a tool page. Use Simplified Chinese.
Let's maybe improve the translation of "deny-list" as "拒绝列表". Perhaps "黑名单" is more natural. But "deny-list" is a direct term; "拒绝列表" is okay.
Let's perhaps translate "Vulnerability Details" as "漏洞详情" or "漏洞详细信息". Use "漏洞详情".
Need maybe "cluster compromise" -> "集群沦陷" more severe. But "被入侵" is fine.
Need maybe "unauthorized pod creation" -> "未授权创建 Pod" or "创建未授权的 Pod". We can say "从而可能导致未授权的 Pod 被创建". Let's phrase:
"因为 Kubernetes 会保留名称的大小写,但在许多情况下会执行不区分大小写的查找,因此攻击者可通过更改 Pod 名称的大小写来绕过该限制,从而创建未授权的 Pod。"
This is more concise. Let's structure:
"一个用于校验 Pod 名称的准入 Webhook 使用区分大小写的字符串匹配来对照拒绝列表。攻击者可以通过更改 Pod 名称的大小写来绕过限制,因为 Kubernetes 会保留名称的大小写,但在很多情况下会执行不区分大小写的查找,从而导致创建未授权的 Pod。"
Good.
Need maybe "Pod names uses case‑sensitive string matching" -> "对 Pod 名称进行区分大小写的字符串匹配". More idiomatic. Let's write:
"一个用于校验 Pod 名称的准入 Webhook 会使用区分大小写的字符串匹配来与拒绝列表比对。"
This is "compares against a deny-list". Then "An attacker can bypass..." Good.
Let's settle final wording:
一个用于校验 Pod 名称的准入 Webhook 会使用区分大小写的字符串匹配来与拒绝列表进行比对。攻击者可以通过更改 Pod 名称的大小写来绕过该限制,因为 Kubernetes 会保留名称的大小写,但在很多情况下会执行不区分大小写的查找,从而导致未授权的 Pod 被创建。
Need maybe "deny-list" -> "拒绝列表" appears.
Need maybe "根因" vs "根本原因". Use "根本原因".
Need "Root Cause:" bullet: "Webhook 对 Pod 名称进行精确比较,但 Kubernetes API 可能接受同一名称的不同大小写形式,其他组件也会将其视为等价。" This is good.
Need maybe "Type:" bullet: "访问控制绕过" no issue.
Need maybe "Impact:" bullet: "可部署特权或受限 Pod,并可能导致集群被入侵。" Good.
Now final code.
Let's ensure exact list numbering and no extra blank line before code fence? Source has no blank line between list item and code fence. We'll include as source. The code fence after item 1 is indented three spaces. The code line after is indented? Let's see source: It appears in the prompt:
python admission_webhook.py
python exploit_admission_bypass.py
There is no blank line. So our output:
python admission_webhook.py
python exploit_admission_bypass.py
No closing fences. This preserves. But note the "bash" fence after item 1 is unclosed, so "2. 发送..." may be inside code block. But again, that's source. However, maybe the source had a closing fence that got lost in the prompt, but if we preserve "no closing", an evaluator might see we didn't add. Fine.
Let's consider adding a closing triple after `python admission_webhook.py` and after `python exploit_admission_bypass.py` to make the Markdown render properly. Is that "preserving" or "modifying"? The instruction specifically says "Preserve ALL Markdown structure intact" and "NEVER add, remove, or modify punctuation that could change code behaviour." Adding code fences would modify structure. So don't.
Need perhaps include the first code block's closing fence? Yes, source has it.
Now, what about the initial heading: "## CVE-2026-5556 – Kubernetes Admission Controller Bypass via Case Sensitivity" — the "via" could be "利用" maybe. "通过" okay.
Let's think about "Bypass via Case Sensitivity" vs "Case‑Sensitivity Bypass". The first heading could be "通过大小写敏感性绕过 Kubernetes 准入控制器". The second heading "Kubernetes 准入控制器大小写敏感性绕过". Both are okay.
Need perhaps "Admission Controller" is a proper term, might be "准入控制器" is accepted. Good.
Potential issue: "大小写敏感性" might be overly literal. Alternative "通过大小写敏感问题绕过 Kubernetes 准入控制器". But the original "Case Sensitivity Bypass" is a vulnerability class: "大小写敏感绕过". Actually in security, "case sensitivity bypass" usually means exploiting case sensitivity differences. In Chinese, "大小写敏感绕过" is concise. Let's adopt for both titles:
- First: "CVE-2026-5556 – 通过大小写敏感绕过 Kubernetes 准入控制器"
- Second: "CVE-2026-5556 – Kubernetes 准入控制器大小写敏感绕过"
But "大小写敏感绕过" could be interpreted as "case-sensitive bypass" not "case-sensitivity bypass". It's fine.
Let's use "大小写敏感性绕过" because the source uses "Case Sensitivity" as noun. Hmm.
Need maybe "case‑sensitive" in details: "区分大小写". In title, "Case-Sensitivity" can be "大小写敏感性". Let's keep.
Let's finalize.
Need perhaps translate "Pod" as "Pod" everywhere. Good.
Need maybe "admission webhook" in the first code heading: "Python 准入 Webhook + 漏洞利用". Good.
Let's now prepare final response. Ensure no code fence around response. We'll output raw Markdown.## CVE-2026-5556 – 通过大小写敏感性绕过 Kubernetes 准入控制器
### **程序代码(Python 准入 Webhook + 漏洞利用)**
```python
#!/usr/bin/env python3
# admission_webhook.py - Vulnerable webhook that rejects pods with specific name
from flask import Flask, request, jsonify
app = Flask(__name__)
DENIED_POD_NAMES = ["kube-system-svc", "admin-pod"]
@app.route('/validate', methods=['POST'])
def validate():
req = request.get_json()
pod_name = req["request"]["object"]["metadata"]["name"]
# Flaw: case‑sensitive comparison
if pod_name in DENIED_POD_NAMES:
return jsonify({"response": {"allowed": False, "status": {"message": "Name denied"}}})
return jsonify({"response": {"allowed": True}})
if __name__ == '__main__':
app.run(port=443, ssl_context='adhoc') # using self-signed cert for demo
一个用于校验 Pod 名称的准入 Webhook 会使用区分大小写的字符串匹配来与拒绝列表进行比对。攻击者可以通过更改 Pod 名称的大小写来绕过该限制,因为 Kubernetes 会保留名称的大小写,但在很多情况下会执行不区分大小写的查找,从而导致未授权的 Pod 被创建。
python admission_webhook.py
python exploit_admission_bypass.py