Skip to content

Commit 887d93a

Browse files
authored
Update SECURITY.md
1 parent 51f23d5 commit 887d93a

1 file changed

Lines changed: 128 additions & 2 deletions

File tree

SECURITY.md

Lines changed: 128 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,134 @@
22

33
## Supported Versions
44

5-
Only the latest version is guaranteed to be secure. For this purpose, Byte Buddy maintains backwards compatibility. Please note the [readme of the project](https://github.com/raphw/byte-buddy/blob/master/README.md) for further information.
5+
| Version Range | Supported |
6+
|--------------|----------|
7+
| Latest | Yes |
8+
| Older | No |
9+
10+
Security fixes are applied only to the latest released version. Users are strongly encouraged to upgrade.
11+
12+
---
613

714
## Reporting a Vulnerability
815

9-
Please disclose responsibly by [contacting the maintainer](mailto:rafael.wth@gmail.com). After a fix is released, any vulnerability will be publicly disclosed and registered. As of today, no vulnerabilities are known to exists.
16+
Please report security vulnerabilities via GitHub Security Advisories.
17+
18+
**Do not open public issues for security-related reports.**
19+
20+
When reporting, include:
21+
- Affected versions
22+
- Detailed reproduction steps
23+
- Proof-of-concept (if available)
24+
- Impact assessment
25+
26+
### Response Targets
27+
28+
- Initial acknowledgment: within 48 hours
29+
- Triage and assessment: within 3–5 days
30+
31+
### Fix Targets
32+
33+
- Critical issues: < 7 days
34+
- High severity: < 14 days
35+
- Medium/Low: best effort
36+
37+
---
38+
39+
## Severity Classification
40+
41+
- **Critical**
42+
- Arbitrary code execution through instrumentation
43+
- Unsafe class loading leading to sandbox escape
44+
45+
- **High**
46+
- Privilege escalation via agent misuse
47+
- Bypassing intended constraints in bytecode generation
48+
49+
- **Medium**
50+
- Denial of service via malformed bytecode
51+
- Stability issues impacting runtime safety
52+
53+
- **Low**
54+
- Edge-case validation issues
55+
- Non-exploitable incorrect behavior
56+
57+
---
58+
59+
## Disclosure Policy
60+
61+
- Vulnerabilities are handled via private coordination
62+
- Fixes are developed and validated before disclosure
63+
- Public disclosure occurs after a fix is available
64+
65+
Advisories will include:
66+
- Affected versions
67+
- Description of impact
68+
- Mitigation steps
69+
- Upgrade guidance
70+
71+
---
72+
73+
## Security Best Practices for Users
74+
75+
- Restrict use of Java agents in production environments
76+
- Validate class loaders and transformation targets
77+
- Keep Byte Buddy updated to the latest version
78+
- Avoid exposing instrumentation capabilities to external users
79+
80+
---
81+
82+
## Dependencies
83+
84+
Byte Buddy repackages ASM internally to avoid dependency conflicts.
85+
86+
Users should still monitor:
87+
- JVM-level vulnerabilities
88+
- Build and runtime environments
89+
- Dependency scanning results in their own systems
90+
91+
---
92+
93+
# Threat Model
94+
95+
## Overview
96+
97+
Byte Buddy is safe to use as a regular library for class generation and extension when used within trusted code. The primary risks arise from features that allow modification of existing code or execution of injected logic.
98+
99+
---
100+
101+
## High-Risk Areas
102+
103+
### Java Agents
104+
105+
Java agents can transform or redefine classes at runtime and operate with the full privileges of the hosting JVM.
106+
107+
**Risks**
108+
- Injection of arbitrary code into application classes
109+
- Modification of security-sensitive logic
110+
- Full process compromise if misused or exposed
111+
112+
**Guidance**
113+
- Do not allow untrusted agents
114+
- Restrict agent attachment in production environments
115+
116+
---
117+
118+
### Build Plugins
119+
120+
Byte Buddy can be used in build tools to modify bytecode during compilation or packaging.
121+
122+
**Risks**
123+
- Execution of malicious code during build
124+
- Supply chain compromise via untrusted plugins or dependencies
125+
126+
**Guidance**
127+
- Only use trusted plugins and dependencies
128+
- Verify build integrity and dependency sources
129+
130+
---
131+
132+
## Summary
133+
134+
- Regular library usage is considered safe under normal conditions
135+
- The main security risks stem from **code injection capabilities**, especially via agents and build-time instrumentation

0 commit comments

Comments
 (0)